]> git.sur5r.net Git - openldap/commitdiff
ITS#8321 Fix del/dupsort
authorHoward Chu <hyc@openldap.org>
Sun, 22 Nov 2015 22:11:30 +0000 (22:11 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 23 Nov 2015 01:48:59 +0000 (01:48 +0000)
When deleting a dupsort key, if other cursors pointed at that key,
set them to uninit'd, not EOF. They no longer have anything to
point at.

libraries/liblmdb/mdb.c

index 77287b77281bcc169f9c35cb2b03a1e6f9becb8d..a4a9e1f318060d505a7b8291e55a889430849bcd 100644 (file)
@@ -8131,7 +8131,7 @@ mdb_cursor_del0(MDB_cursor *mc)
                                        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;
+                                               m3->mc_xcursor->mx_cursor.mc_flags &= ~C_INITIALIZED;
                                }
                        }
                }