|
|
@ -7719,16 +7719,19 @@ mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst) |
|
|
|
MDB_dbi dbi = csrc->mc_dbi; |
|
|
|
MDB_dbi dbi = csrc->mc_dbi; |
|
|
|
MDB_page *mp; |
|
|
|
MDB_page *mp; |
|
|
|
|
|
|
|
|
|
|
|
mp = cdst->mc_pg[csrc->mc_top]; |
|
|
|
/* If we're adding on the left, bump others up */ |
|
|
|
for (m2 = csrc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) { |
|
|
|
if (!cdst->mc_ki[csrc->mc_top]) { |
|
|
|
if (csrc->mc_flags & C_SUB) |
|
|
|
mp = cdst->mc_pg[csrc->mc_top]; |
|
|
|
m3 = &m2->mc_xcursor->mx_cursor; |
|
|
|
for (m2 = csrc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) { |
|
|
|
else |
|
|
|
if (csrc->mc_flags & C_SUB) |
|
|
|
m3 = m2; |
|
|
|
m3 = &m2->mc_xcursor->mx_cursor; |
|
|
|
if (m3 == cdst) continue; |
|
|
|
else |
|
|
|
if (m3->mc_pg[csrc->mc_top] == mp && m3->mc_ki[csrc->mc_top] >= |
|
|
|
m3 = m2; |
|
|
|
cdst->mc_ki[csrc->mc_top]) { |
|
|
|
if (m3 == cdst) continue; |
|
|
|
m3->mc_ki[csrc->mc_top]++; |
|
|
|
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]++; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|