fix count

This commit is contained in:
Pere Diaz Bou
2025-06-03 17:29:17 +02:00
committed by Jussi Saurio
parent 96324834a5
commit c52d9a52d9

View File

@@ -4844,6 +4844,7 @@ impl BTreeCursor {
self.count += contents.cell_count();
}
self.stack.advance();
let cell_idx = self.stack.current_cell_index() as usize;
// Second condition is necessary in case we return if the page is locked in the loop below
@@ -4857,7 +4858,6 @@ impl BTreeCursor {
}
// Move to parent
self.going_upwards = true;
self.stack.pop();
mem_page_rc = self.stack.top();
@@ -4884,7 +4884,6 @@ impl BTreeCursor {
let right_most_pointer = contents.rightmost_pointer().unwrap();
self.stack.advance();
let mem_page = self.read_page(right_most_pointer as usize)?;
self.going_upwards = false;
self.stack.push(mem_page);
} else {
// Move to child left page
@@ -4911,7 +4910,6 @@ impl BTreeCursor {
}) => {
self.stack.advance();
let mem_page = self.read_page(left_child_page as usize)?;
self.going_upwards = false;
self.stack.push(mem_page);
}
_ => unreachable!(),