mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
fix defragmentation code a bit
This commit is contained in:
parent
5ce3d12f75
commit
fc502b86c7
1 changed files with 2 additions and 0 deletions
|
@ -1607,6 +1607,8 @@ impl BTreeCursor {
|
|||
page.write_u16(PAGE_HEADER_OFFSET_CELL_CONTENT_AREA, cbrk as u16);
|
||||
// set free block to 0, unused spaced can be retrieved from gap between cell pointer end and content start
|
||||
page.write_u16(PAGE_HEADER_OFFSET_FIRST_FREEBLOCK, 0);
|
||||
// set fragmented bytes counter to zero
|
||||
page.write_u8(PAGE_HEADER_OFFSET_FRAGMENTED_BYTES_COUNT, 0);
|
||||
// set unused space to 0
|
||||
let first_cell = cloned_page.cell_content_area() as u64;
|
||||
assert!(first_cell <= cbrk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue