https://bugs.openldap.org/show_bug.cgi?id=9286
Issue ID: 9286 Summary: mdb_cursor_get MDB_GET_MULTIPLE key not populated Product: LMDB Version: 0.9.25 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: corey@kaylors.net Target Milestone: ---
Reading the docs it says "Return key and up to a page of duplicate data items from current cursor position." when MDB_GET_MULTIPLE is used. I don't see the key being populated, but when I call MDB_GET_CURRENT after the use of MDB_GET_MULTIPLE the key is the value I expect. Looking through the code I don't see the key getting used in this path. Granted, I'm not proficient with C so I may have overlooked something.
https://bugs.openldap.org/show_bug.cgi?id=9286
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to corey from comment #0)
Reading the docs it says "Return key and up to a page of duplicate data items from current cursor position." when MDB_GET_MULTIPLE is used. I don't see the key being populated, but when I call MDB_GET_CURRENT after the use of MDB_GET_MULTIPLE the key is the value I expect. Looking through the code I don't see the key getting used in this path. Granted, I'm not proficient with C so I may have overlooked something.
You've misread the docs. It says exactly:
Return up to a page of duplicate data items from current cursor position. Move cursor to prepare for #MDB_NEXT_MULTIPLE. Only for #MDB_DUPFIXED <<<<
It doesn't say anything about the key.
Closing this.
https://bugs.openldap.org/show_bug.cgi?id=9286
--- Comment #2 from corey@kaylors.net --- Maybe the published docs aren't reflective of the docs you're referencing, but the docs here http://www.lmdb.tech/doc/group__mdb.html#ga1206b2af8b95e7f6b0ef6b28708c9127 state
MDB_GET_MULTIPLE Return key and up to a page of duplicate data items from current cursor position. Move cursor to prepare for MDB_NEXT_MULTIPLE. Only for MDB_DUPFIXED
Clearly the desired behavior though, sorry for raising an issue.
openldap-its@openldap.org wrote:
https://bugs.openldap.org/show_bug.cgi?id=9286
--- Comment #2 from corey@kaylors.net --- Maybe the published docs aren't reflective of the docs you're referencing, but the docs here http://www.lmdb.tech/doc/group__mdb.html#ga1206b2af8b95e7f6b0ef6b28708c9127 state
The docs are generated from lmdb.h. Use the lmdb.h that came in the version of LMDB you're using.
MDB_GET_MULTIPLE Return key and up to a page of duplicate data items from current cursor position. Move cursor to prepare for MDB_NEXT_MULTIPLE. Only for MDB_DUPFIXED
Clearly the desired behavior though, sorry for raising an issue.
This option is used when retrieving multiple duplicate items for the same key. Since the key is always the same, there is no sense in returning it.
https://bugs.openldap.org/show_bug.cgi?id=9286
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- openldap-its@openldap.org wrote:
https://bugs.openldap.org/show_bug.cgi?id=9286
--- Comment #2 from corey@kaylors.net --- Maybe the published docs aren't reflective of the docs you're referencing, but the docs here http://www.lmdb.tech/doc/group__mdb.html#ga1206b2af8b95e7f6b0ef6b28708c9127 state
The docs are generated from lmdb.h. Use the lmdb.h that came in the version of LMDB you're using.
MDB_GET_MULTIPLE Return key and up to a page of duplicate data items from current cursor position. Move cursor to prepare for MDB_NEXT_MULTIPLE. Only for MDB_DUPFIXED
Clearly the desired behavior though, sorry for raising an issue.
This option is used when retrieving multiple duplicate items for the same key. Since the key is always the same, there is no sense in returning it.
https://bugs.openldap.org/show_bug.cgi?id=9286
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED