mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#7722 fix page_merge for collapsing root
Other cursors being fixed up are not necessarily height 1.
This commit is contained in:
parent
bf0e97aa0e
commit
940f5cb373
@ -7161,10 +7161,13 @@ mdb_rebalance(MDB_cursor *mc)
|
||||
m3 = m2;
|
||||
if (m3 == mc || m3->mc_snum < mc->mc_snum) continue;
|
||||
if (m3->mc_pg[0] == mp) {
|
||||
m3->mc_pg[0] = mc->mc_pg[0];
|
||||
m3->mc_snum = 1;
|
||||
m3->mc_top = 0;
|
||||
m3->mc_ki[0] = m3->mc_ki[1];
|
||||
int i;
|
||||
m3->mc_snum--;
|
||||
m3->mc_top--;
|
||||
for (i=0; i<m3->mc_snum; i++) {
|
||||
m3->mc_pg[i] = m3->mc_pg[i+1];
|
||||
m3->mc_ki[i] = m3->mc_ki[i+1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user