Full_Name: Hallvard B Furuseth Version: mdb.master, 8b46dcc26d1e9897ab1da3a4a164cad4a4479a52 OS: Linux x86_64 URL: ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-151005.c Submission from: (NULL) (81.191.45.5) Submitted by: hallvard The test program catches several cursor tracking bugs. $ ./a.out 250 mn_flags = 0 mn_flags = 4 mn_flags = 4 a.c:36: run: Assertion `d1.mv_size == ksz && d1.mv_data == d2.mv_data' failed. Aborted $ ./a.out 500 mn_flags = 0 mn_flags = 4 mn_flags = 6 a.c:36: run: Assertion `d1.mv_size == ksz && d1.mv_data == d2.mv_data' failed. Aborted $ ./a.out 1000 mn_flags = 0 mn_flags = 6 a.c:34: mdb_cursor_get(c1, &k1, &d1, MDB_GET_CURRENT): Invalid argument Aborted It works when the DUPSORT sub-DB is created immediately: $ ./a.out 1500 mn_flags = 6 <repeated 22 times>
h.b.furuseth@usit.uio.no wrote: > Full_Name: Hallvard B Furuseth > Version: mdb.master, 8b46dcc26d1e9897ab1da3a4a164cad4a4479a52 > OS: Linux x86_64 > URL: ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-151005.c > Submission from: (NULL) (81.191.45.5) > Submitted by: hallvard > > > The test program catches several cursor tracking bugs. > It works when the DUPSORT sub-DB is created immediately: Yes, when using a fake page we init the subcursor with the fake page. When using a full sub-DB we left the subcursor pointing to the sub-DB but otherwise uninit'd. > > $ ./a.out 1500 > mn_flags = 6 <repeated 22 times> Fixed now in mdb.master. Note: It's tempting to just merge the new xcursor_init2 function into xcursor_init1 since they're very similar, but that's a bad idea. The xcursor_init1 function really is meant for init'ing an unused cursor; it's expected that immediately after, a full cursor-positioning action will occur. xcursor_init2 is meant for xcursors that have already been positioned, in which case their physical position is updated in order to keep their logical position unchanged. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
fixed in mdb.master
changed notes changed state Open to Test moved from Incoming to Software Bugs
On 07/10/15 07:37, Howard Chu wrote: > Note: It's tempting to just merge the new xcursor_init2 function into > xcursor_init1 since they're very similar, but that's a bad idea. The > xcursor_init1 function really is meant for init'ing an unused cursor; > it's expected that immediately after, a full cursor-positioning action > will occur. > > xcursor_init2 is meant for xcursors that have already been positioned, > in which case their physical position is updated in order to keep their > logical position unchanged. Maybe you should document that in the code instead of in a mail message.
changed state Test to Closed