Commit 1ceae5c2 authored by Howard Chu's avatar Howard Chu
Browse files

Fix multi-page commits

parent 6d924c1d
...@@ -884,11 +884,12 @@ mdb_txn_commit(MDB_txn *txn) ...@@ -884,11 +884,12 @@ mdb_txn_commit(MDB_txn *txn)
/* Commit up to MDB_COMMIT_PAGES dirty pages to disk until done. /* Commit up to MDB_COMMIT_PAGES dirty pages to disk until done.
*/ */
next = 0; next = 0;
i = 1;
do { do {
n = 0; n = 0;
done = 1; done = 1;
size = 0; 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; dp = txn->mt_u.dirty_list[i].mptr;
if (dp->p.mp_pgno != next) { if (dp->p.mp_pgno != next) {
if (n) { if (n) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment