[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8304) LMDB mdb_del data loss in a cursor



Full_Name: Michael Alyn Miller
Version: Git head
OS: Windows 8.1 x64, NixOS 14.12 x64
URL: ftp://ftp.openldap.org/incoming/michaelalynmiller-151109.c
Submission from: (NULL) (71.119.103.68)


I have a new repro of an ITS#8264 and ITS#8299-like situation, but with
different input data.

The referenced test runs twice: once with mdb_cursor_del and once with mdb_del.

Just like before, mdb_cursor_del performs correctly whereas mdb_del corrupts
the
database.  In this case, mdb_del incorrectly removes one extra key (a key
prefixed with 03000000000000003a...).

On a related note, I have switched to mdb_cursor_del whenever possible, but
there are a couple of situations where clients of my library only have the key
during a scan and so must use mdb_del instead of mdb_cursor_del.  Just letting
you know that I took your advice from earlier, but must still use mdb_del here
and there.