From 886ee41d55a410ebadf81cbba3082fdffeed18fd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 9 Jul 2014 15:03:54 -0700 Subject: [PATCH] More for cursor EOF Must also set in sub-cursor if deleting entire subDB --- libraries/liblmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 5e77161..f8c94e3 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7659,6 +7659,8 @@ mdb_cursor_del0(MDB_cursor *mc) m3->mc_flags |= C_DEL; if (m3->mc_ki[mc->mc_top] > ki) m3->mc_ki[mc->mc_top]--; + else if (mc->mc_db->md_flags & MDB_DUPSORT) + m3->mc_xcursor->mx_cursor.mc_flags |= C_EOF; } if (m3->mc_ki[mc->mc_top] >= nkeys) { rc = mdb_cursor_sibling(m3, 1);