salortiz / LMDB_File

Perl wrapper around the OpenLDAP's LMDB
Other
8 stars 12 forks source link

Delete operation requires $data, even when MDB_DUPSORT is not used #19

Open akotlar opened 8 years ago

akotlar commented 8 years ago

Usage: LMDB_File::_del(txn, dbi, key, data)

Usage scenario

# Results in: Usage: LMDB_File::_del(txn, dbi, key, data)
$txn->del($db->{dbi}, $pos);

# Same behavior
LMDB_File::_del($txn, $db->{dbi}, $pos);

Expected behavior:

If the database does not support sorted duplicate data items, (MDB_DUPSORT) the $data parameter is optional and is ignored.
hoytech commented 8 years ago

Yup, looks like a bug. As you can probably tell, the DB interface seems to get a lot more use than the low-level txn one :)

akotlar commented 8 years ago

Yeah :) No worries, that makes sense.