...
Code Block | ||
---|---|---|
| ||
/** @brief The max size of a key we can write, or 0 for computed max. * * 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 * #MDB_DUPSORT data items must fit on a node in a regular page. */ // #ifndef MDB_MAXKEYSIZE // #define MDB_MAXKEYSIZE ((MDB_DEVEL) ? 0 : 511) // #endif /** The maximum size of a key we can write to the environment. */ #if MDB_MAXKEYSIZE #define ENV_MAXKEY(env) (MDB_MAXKEYSIZE) #else #define ENV_MAXKEY(env) ((env)->me_maxkey) #endif |
...