mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 14:23:34 -05:00
Fix mdb_page_split - nested split
If updating a page's separator triggers a split in its parent, we may have missed adjusting the parent's cursor position.
This commit is contained in:
parent
1105aa35ba
commit
7233bc295b
1 changed files with 11 additions and 0 deletions
|
|
@ -6933,6 +6933,17 @@ newsep:
|
|||
}
|
||||
} else {
|
||||
mc->mc_ki[ptop]++;
|
||||
/* Make sure mc_ki is still valid.
|
||||
*/
|
||||
if (mn.mc_pg[ptop] != mc->mc_pg[ptop] &&
|
||||
mc->mc_ki[ptop] >= NUMKEYS(mc->mc_pg[ptop])) {
|
||||
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 a new issue