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

(ITS#7825) LMDB: misleading error message

Full_Name: Timur Kristóf
Version: LMDB latest master
OS: Fedora 20
Submission from: (NULL) (


I'm the author of the Node.js LMDB binding and I've found an interesting issue
that might be useful to share with other people who develop bindings or
applications on LMDB.

When you operate on a dbi using a cursor and accidentally close the dbi before
committing the transaction of the cursor, mdb_txn_commit will return
MDB_BAD_VALSIZE. This is quite misleading because the problem doesn't actually
have anything to do with what the error message suggests. ("Too big key/data,
key is empty, or wrong DUPFIXED size")

I suggest to either add a new kind of error code for this situation or to extend
the description of MDB_BAD_VALSIZE.

Here's a small test case which will demonstrate it:

Best regards,
Timur Kristóf