account for divider cell size in page size

This commit is contained in:
Pere Diaz Bou
2025-04-07 22:16:50 +02:00
parent f7de575873
commit 3950ab1e52

View File

@@ -1642,6 +1642,10 @@ impl BTreeCursor {
let size = new_page_sizes.last_mut().unwrap();
// 2 to account of pointer
*size += 2 + overflow.payload.len() as u16;
if !leaf && i < balance_info.sibling_count - 1 {
// Account for divider cell which is included in this page.
let size = new_page_sizes.last_mut().unwrap();
*size += cell_array.cells[cell_array.cell_count(i)].len() as i64;
}
}