mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +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.