From ef00ee609583224b4daaabf47230dccb278f21eb Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 21 Dec 2016 16:33:47 +0100 Subject: [PATCH 1/3] mdbx: backport - Doxygen fixes. Use DISTRIBUTE_GROUP_DOC. - DISTRIBUTE_GROUP_DOC makes doxygen give several fields the same doc: mn_hi + mn_lo in MDB_node. - Don't hide a doxygen #name inside double quotes. Change-Id: I173ff54a78349344d38e175cf9de741efab29e82 --- Doxyfile | 2 +- mdb.c | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Doxyfile b/Doxyfile index 5047c0bb..5ca2cfe8 100644 --- a/Doxyfile +++ b/Doxyfile @@ -253,7 +253,7 @@ IDL_PROPERTY_SUPPORT = YES # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. -DISTRIBUTE_GROUP_DOC = NO +DISTRIBUTE_GROUP_DOC = YES # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a diff --git a/mdb.c b/mdb.c index 4c2cd1ed..cbee8489 100644 --- a/mdb.c +++ b/mdb.c @@ -614,19 +614,21 @@ typedef struct MDB_page { /** Header for a single key/data pair within a page. * Used in pages of type #P_BRANCH and #P_LEAF without #P_LEAF2. * We guarantee 2-byte alignment for 'MDB_node's. + * + * #mn_lo and #mn_hi are used for data size on leaf nodes, and for child + * pgno on branch nodes. On 64 bit platforms, #mn_flags is also used + * for pgno. (Branch nodes have no flags). Lo and hi are in host byte + * order in case some accesses can be optimized to 32-bit word access. */ typedef struct MDB_node { - /** lo and hi are used for data size on leaf nodes and for - * child pgno on branch nodes. On 64 bit platforms, flags - * is also used for pgno. (Branch nodes have no flags). - * They are in host byte order in case that lets some - * accesses be optimized into a 32-bit word access. - */ + /** part of data size or pgno + * @{ */ #if BYTE_ORDER == LITTLE_ENDIAN - unsigned short mn_lo, mn_hi; /**< part of data size or pgno */ + unsigned short mn_lo, mn_hi; #else unsigned short mn_hi, mn_lo; #endif + /** @} */ /** @defgroup mdb_node Node Flags * @ingroup internal * Flags for node headers. From 5bed0413f34c2e514d24bd544c92c54c838ca973 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 21 Dec 2016 21:40:14 +0100 Subject: [PATCH 2/3] mdbx: backport - More MDB_node doc. Change-Id: I2a4d2596af8d2c551d891b567e4d3366b2d6ad8c --- mdb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mdb.c b/mdb.c index cbee8489..27df5516 100644 --- a/mdb.c +++ b/mdb.c @@ -619,6 +619,11 @@ typedef struct MDB_page { * pgno on branch nodes. On 64 bit platforms, #mn_flags is also used * for pgno. (Branch nodes have no flags). Lo and hi are in host byte * order in case some accesses can be optimized to 32-bit word access. + * + * Leaf node flags describe node contents. #F_BIGDATA says the node's + * data part is the page number of an overflow page with actual data. + * #F_DUPDATA and #F_SUBDATA can be combined giving duplicate data in + * a sub-page/sub-database, and named databases (just #F_SUBDATA). */ typedef struct MDB_node { /** part of data size or pgno From bb7d3b4639495388ba9309ad15a2ca47033b1062 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 21 Dec 2016 13:02:00 +0000 Subject: [PATCH 3/3] mdbx: backport - More 0.9.19 updates. Change-Id: I4571ba200677124ab41f80a9c0cf37d620d5d230 --- CHANGES | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index cb19ff64..6ddd7d47 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,6 @@ MDBX Add MDB_PREV_MULTIPLE - Fix MDB_CP_COMPACT (ITS#8209) Add error MDB_PROBLEM, replace some MDB_CORRUPTED - Backport fixes for ITS#8406 LMDB 0.9.19 Release Engineering Fix mdb_env_cwalk cursor init (ITS#8424) @@ -11,6 +9,16 @@ LMDB 0.9.19 Release Engineering Optimize mdb_drop Fix xcursors after mdb_cursor_del (ITS#8406) Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412) + Fix mdb_cursor_put resetting C_EOF (ITS#8489) + Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504) + Fix mdb_env_copy with empty DB (ITS#8209) + Fix behaviors with fork (ITS#8505) + Fix mdb_dbi_open with mainDB cursors (ITS#8542) + Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682) + Documentation + Cleanup doxygen nits + Note reserved vs actual mem/disk usage + LMDB 0.9.18 Release (2016/02/05) already done for mdbx - Fix robust mutex detection on glibc 2.10-11 (ITS#8330)