[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8937) Possibly wrong MDB_DUPFIXED flag check
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8937) Possibly wrong MDB_DUPFIXED flag check
- From: hyc@symas.com
- Date: Sun, 18 Nov 2018 17:28:30 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
juerg.bircher@gmail.com wrote:
> Full_Name: Juerg Bircher
> Version: LMDB master
> OS: macOS
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (178.83.86.107)
>
>
> In mdb_cursor_put the flag MDB_DUPFIXED is checked on line 7628 as follows:
>
> if ((mc->mc_db->md_flags & (MDB_DUPSORT|MDB_DUPFIXED))
> == MDB_DUPFIXED)
> np->mp_flags |= P_LEAF2;
>
> Should it not be like this:
> if (mc->mc_db->md_flags & MDB_DUPFIXED)
> np->mp_flags |= P_LEAF2;
No, the code is correct.
> According to the documentation:
> * <li>#MDB_DUPFIXED
> * This flag may only be used in combination with #MDB_DUPSORT.
That is documentation for users of the API. It does not dictate what LMDB does internally.
> So the expression (mc->mc_db->md_flags & (MDB_DUPSORT|MDB_DUPFIXED)) ==
> MDB_DUPFIXED) would never match.
False.
There's no bug here. Closing this ITS.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/