https://bugs.openldap.org/show_bug.cgi?id=9476
Issue ID: 9476 Summary: Documentation error for MDB_GET_BOTH_RANGE Product: LMDB Version: 0.9.28 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: jaqenn@hotmail.com Target Milestone: ---
The documentation for MDB_GET_BOTH_RANGE is incorrect.
This operation is documented as 'position at key, nearest data'. It appears to me that it should instead say 'position at key, first data greater than or equal to specified data'.
If I call mdb_cursor_get with a valid key and a data smaller than all existing values, then lmdb returns MDB_SUCCESS and the cursor is positioned at the first value.
If I call mdb_cursor_get with a valid key and a data larger than all existing values, then lmdb returns MDB_NOTFOUND and the cursor is not repositioned.
The documentation 'nearest data' makes me expect that if I call mdb_cursor_get with a valid key and a data larger than all existing values, then lmdb would return MDB_SUCCESS and the cursor is positioned at the last value.