mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
ITS#7815 fix mdb_page_split
Was leaving cursor pointed at wrong page if the newindx was in the right sibling page, and the parent was also split.
This commit is contained in:
parent
e2bdd44624
commit
0e7fba73b7
@ -7857,12 +7857,10 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
|
||||
*/
|
||||
if (mn.mc_pg[ptop] != mc->mc_pg[ptop] &&
|
||||
mc->mc_ki[ptop] >= NUMKEYS(mc->mc_pg[ptop])) {
|
||||
for (i=0; i<ptop; i++) {
|
||||
for (i=0; i<=ptop; i++) {
|
||||
mc->mc_pg[i] = mn.mc_pg[i];
|
||||
mc->mc_ki[i] = mn.mc_ki[i];
|
||||
}
|
||||
mc->mc_pg[ptop] = mn.mc_pg[ptop];
|
||||
mc->mc_ki[ptop] = mn.mc_ki[ptop] - 1;
|
||||
}
|
||||
}
|
||||
/* return tmp page to freelist */
|
||||
|
Loading…
Reference in New Issue
Block a user