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

Re: (ITS#8117) Bugs related to key-size in lmdb and backend



On 04/05/15 02:13, h.b.furuseth@usit.uio.no wrote:
> (...) If I understand correctly this time, the doc should
> simply say that the two types size_t and unsigned int are supported.
> The "typically" is plain misleading.
>
> That is, if mdb_node_search() shows the intent when it picks either
> int-sized or size_t-sized for IS_BRANCH.  OTOH, another bug:
>
> default_cmp pick cmp_int for INTEGERDUP|DUPFIXED and some other
> replaces md_dcmp = cmp_int with cmp_long, which makes no sense unless
> cmp_int is just a placeholder.  Yet at least mdb_dcmp() calls that
> placeholder directly without checking the data size.

If that's the intent, branch "mdb/keysize" @ my UiO repo fixes it.
Should it do the following too?

> And if it's
> just a placeholder, how about instead setting dcmp to something which
> just abort()s, to make sure the bug of not replacing it is caught?

Hallvard