Full_Name: Hallvard B Furuseth Version: mdb.master, 4b9aed26a5b1c0027b10d211c6e7270dbb1ade1c OS: Linux x86_64 URL: Submission from: (NULL) (2001:700:100:556::233) Submitted by: hallvard mdb_cursor_put() does not always know if it'll be inserting a new item or not, e.g. when inserting in a sub-database. This was always wrong, but recent commits changed how it was wrong. Fix: Split 'insert' in 'insert_key' + 'insert_data'. Compute insert_data from mx_db.md_entries before and after the insert. In my UiO repo, branch mdb/todo-3: 02dd3865d5 [Rewritten] ITS#xxxx Fix MDB_db.md_entries. c6c78f71d3 [New] Tweak varname 'insert'. (Cosmetic patch which does not apply cleanly, I guess I should make an mdb/todo-4 branch where it is applied earlier.) Affects ITS#7834. mdb_cursor_del(, MDB_NODUPDATA) only subtracts 1 from md_entries when deleting a sub-page, instead of no of DUP entries. Fix: fa8e827026 [New,Squash] Fix md_entries in mdb_cursor_del:MDB_NODUPDATA.
More: mdb_cursor_put() now tracks data items instead of keys in md_entries, broken by 13d6d59c512065db3741c20c65b4d9928b986968. mdb_cursor_del(, MDB_NODUPDATA) is off-by-one for sub-DBs: It subtracts subDB.md_entries, then mdb_cursor_del0() subtracts 1. Fixing.
> mdb_cursor_put() now tracks data items instead of keys in > md_entries, broken by 13d6d59c512065db3741c20c65b4d9928b986968. oops, that was backwards. Changed to tracking keys from data items.
changed notes changed state Open to Test moved from Incoming to Software Bugs
fixed in mdb.master
changed state Test to Closed