]> git.sur5r.net Git - openldap/commitdiff
ITS#8304 fix page_merge
authorHoward Chu <hyc@openldap.org>
Mon, 9 Nov 2015 20:09:10 +0000 (20:09 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 9 Nov 2015 20:09:10 +0000 (20:09 +0000)
Was using the pre-touch dst page pointer instead of the touched page

libraries/liblmdb/mdb.c

index 59222cadeaf38024ce812c07987b34a5c792cd9c..6d9e0a44157ae7c6dc2c63a7c7a91e0e9d0b9779 100644 (file)
@@ -7854,6 +7854,9 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst)
        if ((rc = mdb_page_touch(cdst)))
                return rc;
 
+       /* get dst page again now that we've touched it. */
+       pdst = cdst->mc_pg[cdst->mc_top];
+
        /* Move all nodes from src to dst.
         */
        j = nkeys = NUMKEYS(pdst);