mdbx: backport - ITS#8315 fix ovpage_free.

Keep dirty_room sync'd with dirty_list

Change-Id: I9e52a72df95ffb504740e8daecf65b62970e9f25
This commit is contained in:
Howard Chu 2015-11-18 23:38:34 +00:00 committed by Leo Yuriev
parent 12cd2361e7
commit 7e2000ef7a
2 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ LMDB 0.9.17 Release Engineering
Fix ITS#8311 page_split from update_key
Fix ITS#8312 loose pages in nested txn
Fix ITS#8313 mdb_rebalance dummy cursor
Fix ITS#8315 dirty_room in nested txn
Added mdb_txn_id() (ITS#7994)
Added robust mutex support
Miscellaneous cleanup/simplification

2
mdb.c
View File

@ -5541,6 +5541,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:
@ -6697,6 +6698,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)) {