From: Howard Chu Date: Mon, 9 Nov 2015 20:09:10 +0000 (+0000) Subject: ITS#8304 fix page_merge X-Git-Tag: LMDB_0.9.17~45 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d8f9ddf7e874ae63ac7821453c7368302bc8d73;p=openldap ITS#8304 fix page_merge Was using the pre-touch dst page pointer instead of the touched page --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 3df4a1d2f4..98c73830e0 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7733,6 +7733,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);