From: Hallvard Furuseth Date: Thu, 27 Jul 2017 06:19:03 +0000 (+0200) Subject: Keep MC_OVPG() == NULL when not MDB_REMAPPING() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=972917449de3838f22cf3dc5456dc8ded3d3355f;p=thirdparty%2Fopenldap.git Keep MC_OVPG() == NULL when not MDB_REMAPPING() Needed since 418ea8b94e14567ba2be9f9772f38f563a0d7e9c introduced option MDB_REMAP_CHUNKS. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 149899a3b8..7c0343447d 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1502,7 +1502,9 @@ struct MDB_cursor { #if MDB_RPAGE_CACHE MDB_page *mc_ovpg; /**< a referenced overflow page */ # define MC_OVPG(mc) ((mc)->mc_ovpg) -# define MC_SET_OVPG(mc, pg) ((mc)->mc_ovpg = (pg)) +# define MC_SET_OVPG(mc, pg) \ + ((mc)->mc_ovpg = \ + (MDB_REMAPPING((mc)->mc_txn->mt_env->me_flags) ? (pg) : NULL)) #else # define MC_OVPG(mc) ((MDB_page *)0) # define MC_SET_OVPG(mc, pg) ((void)0)