From a04aad31c248401694d49d4c041db26d8b7ac310 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 26 Apr 2016 12:52:21 +0100 Subject: [PATCH] ITS#8412 fix NEXT_DUP after cursor_del --- libraries/liblmdb/mdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index e62ca628e7..72294a7e51 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6417,7 +6417,8 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) MDB_node *leaf; int rc; - if (mc->mc_flags & C_EOF) { + if ((mc->mc_flags & C_EOF) || + ((mc->mc_flags & C_DEL) && op == MDB_NEXT_DUP)) { return MDB_NOTFOUND; } if (!(mc->mc_flags & C_INITIALIZED)) -- 2.39.5