From a783325a6d9966fc7ffc476537831510b17d576c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 26 Jul 2017 21:37:40 +0100 Subject: [PATCH] mdbx: backport - ITS#8699 more for cursor_del ITS#8622. Set C_DEL flag on reinit'd subcursor Change-Id: I8ad1c10afd481f61b8e521d02c4d2de3be5089d7 --- mdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index 6f8d3da2..8aea98b8 100644 --- a/mdb.c +++ b/mdb.c @@ -8805,8 +8805,10 @@ mdb_cursor_del0(MDB_cursor *mc) if (m3->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) { if (!(node->mn_flags & F_SUBDATA)) m3->mc_xcursor->mx_cursor.mc_pg[0] = NODEDATA(node); - } else + } else { mdb_xcursor_init1(m3, node); + m3->mc_xcursor->mx_cursor.mc_flags |= C_DEL; + } } } }