From: Hallvard Furuseth Date: Thu, 28 May 2015 18:51:24 +0000 (+0200) Subject: ITS#8156 Fix MDB_MAXKEYSIZE doc X-Git-Tag: LMDB_0.9.15~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a0b96697c5ac66c7099028909cc9423be3fa68ce;hp=277e536ffa7090ff334254e6eaf2c8ead1cdbd53;p=openldap ITS#8156 Fix MDB_MAXKEYSIZE doc --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 71852b1f6e..6bdf3151dc 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -446,12 +446,17 @@ static txnid_t mdb_debug_start; /** The version number for a database's lockfile format. */ #define MDB_LOCK_VERSION 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 - * is default for backwards compat: liblmdb <= 0.9.10 can break - * when modifying a DB with keys/dupsort data bigger than its max. - * #MDB_DEVEL sets the default to 0. + * This macro should normally be left alone or set to 0. + * Note that a database with big keys or dupsort data cannot be + * reliably modified by a liblmdb which uses a smaller max. + * 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 * this size, since they're actually keys of a sub-DB. Keys and