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

(ITS#8299) LMDB mdb_del data loss when used in a cursor (new repro)

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

I have a new repro of an ITS#8264-like situation, but with different input data
and with slightly different results.  Note that ITS#8264 was fixed with the
dataset provided in that bug; this is a different dataset and produces different

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 04000000000000003a...), and incorrectly leaves 21 keys in place
that should have been deleted (those keys begin with 05000000000000003a...). 
This last item is the primary difference between these two bugs.

Unlike ITS#8264, you do not need to remove the database in between test runs in
order to repro this issue, although the results are still incorrect and will
eventually cause a bus error.