From: Hallvard Furuseth Date: Wed, 9 Jul 2014 18:18:08 +0000 (+0200) Subject: MDB_MAXKEYSIZE = 0 (dynamic value) when MDB_DEVEL X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~126^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2825ad64c2ee0dbba56b379d227c400be772d88c;p=openldap MDB_MAXKEYSIZE = 0 (dynamic value) when MDB_DEVEL --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 6284edccd1..2b41c2e2dd 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -427,13 +427,14 @@ static txnid_t mdb_debug_start; * 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. * * Data items in an #MDB_DUPSORT database are also limited to * this size, since they're actually keys of a sub-DB. Keys and * #MDB_DUPSORT data items must fit on a node in a regular page. */ #ifndef MDB_MAXKEYSIZE -#define MDB_MAXKEYSIZE 511 +#define MDB_MAXKEYSIZE ((MDB_DEVEL) ? 0 : 511) #endif /** The maximum size of a key we can write to the environment. */