[email protected] 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/



Reply via email to