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

Re: (ITS#8908) LMDB Documentation for MDB_XXX_MULTIPLE

> Full_Name: Karl Waclawek
> Version: LMDB 0.9.22
> OS: Windows 10
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2607:fea8:7a80:814:3ca9:e8f6:801c:d6f8)
> The documentation in lmdb.h for MDB_GET_MULTIPLE, MDB_NEXT_MULTIPLE and
> MDB_PREV_MULTIPLE seems to have two issues:
> 1) The documentation indicates that both, the key and data, are returned, but
> reality only the data is returned.

Looks like you're right. Since these are DUPs the key would be the same
every time so there's no need to return it on each call.
Doc fixed in git mdb.master.

> 2) The documentation states that MDB_GET_MULTIPLE moves the cursor. This does
> not seem to be true.

The doc is correct here. The cursor is advanced far enough that a
MDB_NEXT_MULTIPLE will return the following data, as opposed to just
returning the same data again.