projects
/
platform
/
upstream
/
lmdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
415d987
)
Fix free page re-use
author
Howard Chu
<hyc@symas.com>
Wed, 3 Aug 2011 10:29:15 +0000
(
03:29
-0700)
committer
Howard Chu
<hyc@symas.com>
Thu, 1 Sep 2011 23:17:07 +0000
(16:17 -0700)
libraries/libmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/libmdb/mdb.c
b/libraries/libmdb/mdb.c
index 5715eac78c3d4f9e82cb086f0354a95532f735df..cb12757097996bebce36743056c36ea2aa113f3c 100644
(file)
--- a/
libraries/libmdb/mdb.c
+++ b/
libraries/libmdb/mdb.c
@@
-398,7
+398,9
@@
mdb_alloc_page(MDB_txn *txn, MDB_page *parent, unsigned int parent_idx, int num)
ULONG oldest = txn->mt_txnid - 2;
unsigned int i;
for (i=0; i<txn->mt_env->me_txns->mt_numreaders; i++) {
- if (txn->mt_env->me_txns->mt_readers[i].mr_txnid < oldest)
+ ULONG mr = txn->mt_env->me_txns->mt_readers[i].mr_txnid;
+ if (!mr) continue;
+ if (mr < oldest)
oldest = txn->mt_env->me_txns->mt_readers[i].mr_txnid;
}
if (oldest > txn->mt_env->me_pghead->mo_txnid) {