From: Howard Chu Date: Sun, 3 May 2015 06:43:11 +0000 (+0100) Subject: Revert "ITS#8117 cleanup prev commit" X-Git-Tag: LMDB_0.9.15~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=712775324481effbd3c1e645a326df4907f307d6;p=openldap Revert "ITS#8117 cleanup prev commit" This reverts commit 47c4e747a0ce58f9ecfb5b9615f4c2b6d0753024. Revert "ITS#8117 fix INTEGERDUP compare" This reverts commit ba45e0c05aee867ac1d8240eeb013d37487bb146. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 19705a0618..fe651509f8 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7076,15 +7076,13 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) mx->mx_db.md_flags |= MDB_INTEGERKEY; } } -#if UINT_MAX < SIZE_MAX - if (mc->mc_dbx->md_dcmp == mdb_cmp_int && mx->mx_db.md_pad == sizeof(size_t)) { - mc->mc_dbx->md_dcmp = mdb_cmp_clong; - mx->mx_dbx.md_cmp = mdb_cmp_clong; - } -#endif DPRINTF(("Sub-db -%u root page %"Z"u", mx->mx_cursor.mc_dbi, mx->mx_db.md_root)); mx->mx_dbflag = DB_VALID|DB_DIRTY; /* DB_DIRTY guides mdb_cursor_touch */ +#if UINT_MAX < SIZE_MAX + if (mx->mx_dbx.md_cmp == mdb_cmp_int && mx->mx_db.md_pad == sizeof(size_t)) + mx->mx_dbx.md_cmp = mdb_cmp_clong; +#endif } /** Initialize a cursor for a given transaction and database. */