From: Hallvard Furuseth Date: Sat, 4 Jul 2015 11:48:01 +0000 (+0200) Subject: Use mdb_cmp_long() for FREE_DBI X-Git-Tag: accepted/tizen/5.0/unified/20181102.030725~219 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f702e33b6cdf750a0affab64144379138bcf997c;p=platform%2Fupstream%2Flmdb.git Use mdb_cmp_long() for FREE_DBI --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 8270100..7cf5294 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4769,6 +4769,7 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode rc = ENOMEM; goto leave; } + env->me_dbxs[FREE_DBI].md_cmp = mdb_cmp_long; /* aligned MDB_INTEGERKEY */ /* For RDONLY, get lockfile after we know datafile exists */ if (!(flags & (MDB_RDONLY|MDB_NOLOCK))) { @@ -9316,10 +9317,6 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db unsigned int unused = 0, seq; size_t len; - if (txn->mt_dbxs[FREE_DBI].md_cmp == NULL) { - mdb_default_cmp(txn, FREE_DBI); - } - if ((flags & VALID_FLAGS) != flags) return EINVAL; if (txn->mt_flags & MDB_TXN_ERROR)