lmdb: ITS#8156 Fix MDB_MAXKEYSIZE doc.

Change-Id: Ia9dae2e68f28dcb715ac34226b358212317199c2
This commit is contained in:
Hallvard Furuseth 2015-05-28 20:51:24 +02:00 committed by Leo Yuriev
parent 55ae3dfa8b
commit f71cb6d69e
2 changed files with 11 additions and 5 deletions

View File

@ -18,6 +18,7 @@ LMDB 0.9.15 Release Engineering
Misc. Android/Windows cleanup Misc. Android/Windows cleanup
Documentation Documentation
Fix MDB_APPEND doc Fix MDB_APPEND doc
Fix MDB_MAXKEYSIZE doc (ITS#8156)
Clarify mdb_dbi_open doc Clarify mdb_dbi_open doc
LMDB 0.9.14 Release (2014/09/20) LMDB 0.9.14 Release (2014/09/20)

15
mdb.c
View File

@ -378,12 +378,17 @@ typedef MDB_ID txnid_t;
/** The version number for a database's lockfile format. */ /** The version number for a database's lockfile format. */
#define MDB_LOCK_VERSION ((MDB_DEVEL) ? 999 : 1) #define MDB_LOCK_VERSION ((MDB_DEVEL) ? 999 : 1)
/** @brief The max size of a key we can write, or 0 for dynamic max. /** @brief The max size of a key we can write, or 0 for computed max.
* *
* Define this as 0 to compute the max from the page size. 511 * This macro should normally be left alone or set to 0.
* is default for backwards compat: liblmdb <= 0.9.10 can break * Note that a database with big keys or dupsort data cannot be
* when modifying a DB with keys/dupsort data bigger than its max. * reliably modified by a liblmdb which uses a smaller max.
* #MDB_DEVEL sets the default to 0. * The default is 511 for backwards compat, or 0 when #MDB_DEVEL.
*
* Other values are allowed, for backwards compat. However:
* A value bigger than the computed max can break if you do not
* know what you are doing, and liblmdb <= 0.9.10 can break when
* modifying a DB with keys/dupsort data bigger than its max.
* *
* Data items in an #MDB_DUPSORT database are also limited to * Data items in an #MDB_DUPSORT database are also limited to
* this size, since they're actually keys of a sub-DB. Keys and * this size, since they're actually keys of a sub-DB. Keys and