mdbx: backport - ITS#8412 fix NEXT_DUP after cursor_del.

Change-Id: If0bc63a9d398ae440a7a9ab7f0502b9c9608640e
This commit is contained in:
Howard Chu 2016-04-26 12:52:21 +01:00 committed by Leo Yuriev
parent f57a54a301
commit 7ae6c0f768

3
mdb.c
View File

@ -5840,7 +5840,8 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
MDB_node *leaf;
int rc;
if (unlikely(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))