]> git.sur5r.net Git - openldap/commitdiff
ITS#7574 blind fix
authorHoward Chu <hyc@symas.com>
Tue, 16 Apr 2013 19:05:03 +0000 (12:05 -0700)
committerHoward Chu <hyc@symas.com>
Tue, 16 Apr 2013 19:05:03 +0000 (12:05 -0700)
Fix 227329c8e1fb818548f1936f5dc1349ffd733523, don't persist
the MDB_VALID bit in db.md_flags.

libraries/liblmdb/mdb.c

index ad2cec29ec57af523def4bec64e3bb93e2c073f5..f25222c9fffb5873a1a540b5568c252e1d14b6a5 100644 (file)
@@ -1844,7 +1844,8 @@ mdb_txn_renew0(MDB_txn *txn)
        /* Copy the DB info and flags */
        memcpy(txn->mt_dbs, env->me_metas[txn->mt_toggle]->mm_dbs, 2 * sizeof(MDB_db));
        for (i=2; i<txn->mt_numdbs; i++) {
-               txn->mt_dbs[i].md_flags = x = env->me_dbflags[i];
+               x = env->me_dbflags[i];
+               txn->mt_dbs[i].md_flags = x & PERSISTENT_FLAGS;
                txn->mt_dbflags[i] = (x & MDB_VALID) ? DB_VALID|DB_STALE : 0;
        }
        txn->mt_dbflags[0] = txn->mt_dbflags[1] = DB_VALID;