Leave parent pointing at rightmost pointer at the end of balance_root()

This commit is contained in:
Jussi Saurio
2025-06-05 10:31:45 +03:00
parent cba84b7ce9
commit ae6a943e43

View File

@@ -3803,6 +3803,7 @@ impl BTreeCursor {
self.root_page = root.get().id;
self.stack.clear();
self.stack.push(root_btree.clone());
self.stack.set_cell_index(0); // leave parent pointing at the rightmost pointer (in this case 0, as there are no cells), since we will be balancing the rightmost child page.
self.stack.push(child_btree.clone());
}