]> git.sur5r.net Git - openldap/commitdiff
Fix multi-page commits
authorHoward Chu <hyc@symas.com>
Fri, 19 Aug 2011 06:09:17 +0000 (23:09 -0700)
committerHoward Chu <hyc@symas.com>
Thu, 1 Sep 2011 23:31:10 +0000 (16:31 -0700)
libraries/libmdb/mdb.c

index c1fc8cf6eebc2dff4690e5e01153533a65d3699d..85535f89e29f740f09bc75c8ea84e3cd9fb94e08 100644 (file)
@@ -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) {