[Date Prev][Date Next]
Re: (ITS#7913) LMDB: bugs in mdb_cursor_get(*_DUP)
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#7913) LMDB: bugs in mdb_cursor_get(*_DUP)
- From: email@example.com
- Date: Thu, 31 Jul 2014 16:34:22 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
> Full_Name: Max Bolingbroke
> Version: LMDB HEAD
> OS: OS X
> URL: ftp://ftp.openldap.org/incoming/max-bolingbroke-140730.patch
> Submission from: (NULL) (126.96.36.199)
> 1. When using mdb_cursor_get(MDB_FIRST_DUP) or mdb_cursor_get(MDB_LAST_DUP) on a
> cursor that is currently positioned on a key without any duplicate values, then
> we should return MDB_NOTFOUND rather than EINVAL.
Rethinking this, I think it should simply return the existing non-dup value.
mdb_cursor_count already handles a similar situation, returning 1 for the
count when there are no dups.
> 2. When using mdb_cursor_get(MDB_NEXT_DUP) on a cursor that is currently
> positioned on the final key in the database, we should not return MDB_NOTFOUND
> unless the value we are on is actually the final one within that key.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/