From: Howard Chu Date: Tue, 26 Apr 2016 11:52:21 +0000 (+0100) Subject: ITS#8412 fix NEXT_DUP after cursor_del X-Git-Tag: LMDB_0.9.19~45 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dda2ac0a1b1d7e9399b85817bc98f277287f6f23;p=openldap ITS#8412 fix NEXT_DUP after cursor_del --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index ec7ef8b471..0ac5abbff7 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5641,7 +5641,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))