mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 07:24:19 +01:00
Closes #2227 , enables fixing #2225 ## What Although we cleared overflow pages on DELETE, we never did it for INSERT/UPDATE, which means any overflow pages were left dangling and not added to freelist. ## Why is this a problem This means that we are not able to reuse these pages to solve #2225, causing massive bloat in the DB when UPDATEs are executed. ## Fix Clear overflow pages when `BTreeCursor::insert()` overwrites a cell. Needed a new state machine for `overwrite_cell` + new `WriteState` variants Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #2230