[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
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: hyc@symas.com
 
- Date: Thu, 31 Jul 2014 17:01:56 GMT
 
- Auto-submitted: auto-generated (OpenLDAP-ITS)
 
hyc@symas.com wrote:
> batterseapower@hotmail.com wrote:
>> Full_Name: Max Bolingbroke
>> Version: LMDB HEAD
>> OS: OS X
>> URL: ftp://ftp.openldap.org/incoming/max-bolingbroke-140730.patch
>> Submission from: (NULL) (81.111.197.81)
>>
>>
>> 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.
>
> OK.
>
Alternate fixes in mdb.master.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/