From 12cd2361e7408b305a2d33a98b7c999934b1e3db Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 18 Nov 2015 21:33:51 +0000 Subject: [PATCH] mdbx: backport - ITS#8313 more for ITS#8062. dummy flags must be init'd due to 3d46d550 Change-Id: I3d543bd3e059da9b007f1e752f20171acc183679 --- CHANGES | 1 + mdb.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index aba1a092..134149d3 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,7 @@ LMDB 0.9.17 Release Engineering Fix ITS#7969 use __sync_synchronize on non-x86 Fix ITS#8311 page_split from update_key Fix ITS#8312 loose pages in nested txn + Fix ITS#8313 mdb_rebalance dummy cursor Added mdb_txn_id() (ITS#7994) Added robust mutex support Miscellaneous cleanup/simplification diff --git a/mdb.c b/mdb.c index f906ab72..0c5e6f35 100644 --- a/mdb.c +++ b/mdb.c @@ -8199,6 +8199,7 @@ mdb_rebalance(MDB_cursor *mc) mn.mc_ki[mn.mc_top] += mc->mc_ki[mn.mc_top] + 1; /* We want mdb_rebalance to find mn when doing fixups */ if (mc->mc_flags & C_SUB) { + dummy.mc_flags = C_INITIALIZED; dummy.mc_next = mc->mc_txn->mt_cursors[mc->mc_dbi]; mc->mc_txn->mt_cursors[mc->mc_dbi] = &dummy; dummy.mc_xcursor = (MDB_xcursor *)&mn;