[Date Prev][Date Next]
Re: (ITS#8447) LMDB: Overwriting values in MDB_DUPSORT databases broken
On 21. juni 2016 01:35, email@example.com wrote:
> This is a misuse of MDB_CURRENT: as documented, the new value is supposed to
> be the same size as the existing value.
No, that's not what the doc says.
"MDB_CURRENT - (...) intended to be used when the
new data is the same size as the old. Otherwise it will simply
perform a delete of the old record followed by an insert."
I think LMDB should check the size, even if you change the doc
to match the code rather than the other way around.
If you want to avoid error checks, I'd rather avoid EINVAL checks
like key==NULL which are easier for the user to check than
"old size = new size".