mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
Previously we implemented update as a simple `Delete` + `Insert` procedure which seemed okay for the moment but it wasn't. `Delete` can trigger balance and a post balance `seek` which will leave cursor pointing to an invalid page which `Insert` will try to insert to. We solve this by removing `Delete` from the execution plan and rely on `Insert` to properly overwrite the cell where the rowid is the same as the one we are inserting.
Integration and regression test suite.
# run all tests
cargo test
# run individual test
cargo test test_sequential_write -- --nocapture