]> git.sur5r.net Git - openldap/commitdiff
ITS#8315 fix ovpage_free
authorHoward Chu <hyc@openldap.org>
Wed, 18 Nov 2015 23:38:34 +0000 (23:38 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 19 Nov 2015 10:01:59 +0000 (10:01 +0000)
Keep dirty_room sync'd with dirty_list

libraries/liblmdb/mdb.c

index 9f299737f280422c2d780550c1482579ffdc0f2a..99da353d7d1fbdbe1ae08de4aed31e526beca8ff 100644 (file)
@@ -5570,6 +5570,7 @@ mdb_ovpage_free(MDB_cursor *mc, MDB_page *mp)
                                return MDB_CORRUPTED;
                        }
                }
+               txn->mt_dirty_room++;
                if (!(env->me_flags & MDB_WRITEMAP))
                        mdb_dpage_free(env, mp);
 release:
@@ -6704,6 +6705,7 @@ current:
                                                return ENOMEM;
                                        id2.mid = pg;
                                        id2.mptr = np;
+                                       /* Note - this page is already counted in parent's dirty_room */
                                        rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2);
                                        mdb_cassert(mc, rc2 == 0);
                                        if (!(flags & MDB_RESERVE)) {