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

Re: (ITS#7670) mdb_cursor_del() behaviour improvement



spam@markandruth.co.uk wrote:
> Full_Name: Mark Zealey
> Version: git
> OS: linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (88.253.191.53)
>
>
> As per email thread with Howard, mdb_cursor_del() has a somewhat strange
> behaviour when you reach the end of a page. To my mind it should skip to the
> next entry. This should also be documented as at the moment there is no sign in
> the docs of what happens to the cursor after a delete.

Fixed now in mdb.master, cursor_del will always try to advance to the next item.

> Mark Zealey wrote:
>> On 23/08/13 00:07, Howard Chu wrote:
>>> ... as I said already, it does exactly what you said. When you've
>>> deleted the last item on the page the cursor no longer points at a
>>> valid node, so GET_CURRENT returns EINVAL.
>>
>> OK I think that's a pretty big gotcha - it would be great to either make
>> the cursor behaviour consistent (ie automatically skip to next record at
>> end of a page) or to very clearly document this! It's pretty different
>> from kyoto/bdb interfaces in that (to my mind at least) it requires a
>> bit too much knowledge from the developer about the underlying structure
>> of the database which should be abstracted by the interface.
>
> Yeah, this should probably be changed. Could you submit an ITS for this? Thanks.
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/