]> git.sur5r.net Git - openldap/commitdiff
More for page_loosen
authorHoward Chu <hyc@symas.com>
Sun, 22 Jun 2014 23:39:14 +0000 (16:39 -0700)
committerHoward Chu <hyc@symas.com>
Sun, 22 Jun 2014 23:39:14 +0000 (16:39 -0700)
Don't try this when working on the FreeDB. Again,
too much hassle to unkink the recursions...

libraries/liblmdb/mdb.c

index e5bfc84996eb1df127e0c149afd60cda9a5aeded..efd15e5beaf25b39d72868b5807d523db584ed17 100644 (file)
@@ -7333,7 +7333,10 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst)
        csrc->mc_top++;
 
        psrc = csrc->mc_pg[csrc->mc_top];
-       if (psrc->mp_flags & P_DIRTY) {
+       /* If not operating on FreeDB, allow this page to be reused
+        * in this txn.
+        */
+       if ((psrc->mp_flags & P_DIRTY) && csrc->mc_dbi != FREE_DBI) {
                mdb_page_loose(csrc->mc_txn->mt_env, psrc);
        } else {
                rc = mdb_midl_append(&csrc->mc_txn->mt_free_pgs, psrc->mp_pgno);