From 1ceae5c2c011edc5b5997e08270c5edc185fd248 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 18 Aug 2011 23:09:17 -0700 Subject: [PATCH] Fix multi-page commits --- libraries/libmdb/mdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index c1fc8cf6ee..85535f89e2 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -884,11 +884,12 @@ mdb_txn_commit(MDB_txn *txn) /* Commit up to MDB_COMMIT_PAGES dirty pages to disk until done. */ next = 0; + i = 1; do { n = 0; done = 1; size = 0; - for (i=1; i<=txn->mt_u.dirty_list[0].mid; i++) { + for (; i<=txn->mt_u.dirty_list[0].mid; i++) { dp = txn->mt_u.dirty_list[i].mptr; if (dp->p.mp_pgno != next) { if (n) { -- 2.39.5