mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
Merge remote-tracking branch 'origin/mdb.RE/0.9'
This commit is contained in:
commit
b18d33c548
@ -9,6 +9,7 @@ LMDB 0.9.17 Release Engineering
|
||||
Fix ITS#8263 cursor_put cursor tracking
|
||||
Fix ITS#8264 cursor_del cursor tracking
|
||||
Fix ITS#8299 mdb_del cursor tracking
|
||||
Fix ITS#8300 mdb_del cursor tracking
|
||||
Fix ITS#7771 fakepage cursor tracking
|
||||
Fix ITS#7789 ensure mapsize >= pages in use
|
||||
Fix ITS#7971 mdb_txn_renew0() new reader slots
|
||||
|
@ -7598,16 +7598,19 @@ mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst)
|
||||
MDB_dbi dbi = csrc->mc_dbi;
|
||||
MDB_page *mp;
|
||||
|
||||
mp = cdst->mc_pg[csrc->mc_top];
|
||||
for (m2 = csrc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
|
||||
if (csrc->mc_flags & C_SUB)
|
||||
m3 = &m2->mc_xcursor->mx_cursor;
|
||||
else
|
||||
m3 = m2;
|
||||
if (m3 == cdst) continue;
|
||||
if (m3->mc_pg[csrc->mc_top] == mp && m3->mc_ki[csrc->mc_top] >=
|
||||
cdst->mc_ki[csrc->mc_top]) {
|
||||
m3->mc_ki[csrc->mc_top]++;
|
||||
/* If we're adding on the left, bump others up */
|
||||
if (!cdst->mc_ki[csrc->mc_top]) {
|
||||
mp = cdst->mc_pg[csrc->mc_top];
|
||||
for (m2 = csrc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
|
||||
if (csrc->mc_flags & C_SUB)
|
||||
m3 = &m2->mc_xcursor->mx_cursor;
|
||||
else
|
||||
m3 = m2;
|
||||
if (m3 == cdst) continue;
|
||||
if (m3->mc_pg[csrc->mc_top] == mp && m3->mc_ki[csrc->mc_top] >=
|
||||
cdst->mc_ki[csrc->mc_top]) {
|
||||
m3->mc_ki[csrc->mc_top]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8009,7 +8012,8 @@ mdb_rebalance(MDB_cursor *mc)
|
||||
*/
|
||||
if (PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) >= thresh && NUMKEYS(mn.mc_pg[mn.mc_top]) > minkeys) {
|
||||
rc = mdb_node_move(&mn, mc);
|
||||
if (mc->mc_ki[mc->mc_top-1]) {
|
||||
if (!mc->mc_ki[mc->mc_top]) {
|
||||
/* if we inserted on left, bump position up */
|
||||
oldki++;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user