]> git.sur5r.net Git - openldap/commitdiff
ITS#8412 fix NEXT_DUP after cursor_del
authorHoward Chu <hyc@openldap.org>
Tue, 26 Apr 2016 11:52:21 +0000 (12:52 +0100)
committerHoward Chu <hyc@openldap.org>
Wed, 4 May 2016 09:45:18 +0000 (10:45 +0100)
libraries/liblmdb/mdb.c

index ec7ef8b4710737104267116c3c36f86ac87ad2ba..0ac5abbff7a7d93467738c45a701e281c8e04e94 100644 (file)
@@ -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))