mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
## Background In the simulator, we do our best to replicate the effects of an interactive transaction into the simulator's shadow state whenever that transaction commits. ## Problem this didn't work: BEGIN; ALTER TABLE t ADD COLUMN foo; DELETE FROM t WHERE bar != 5; COMMIT; None of the rows where bar != 5 were deleted because apply_snapshot() was checking that the rows in the committed table were exactly equal to the rows that were recorded, but since the recorded deletes contained a NULL `foo` column, they never matched. This meant that the sim thought it should still have all the rows that were deleted. ## Fix: like all the other operations, record add column / drop column too so that they are applied in sequential order in apply_snapshot() No explicit test for this - I ran into this in another branch of mine whose seed doesn't reproduce on main (because I changed the simulator in that branch). Reviewed-by: Pedro Muniz (@pedrocarlo) Closes #4264 |
||
|---|---|---|
| .. | ||
| memory | ||
| bugbase.rs | ||
| cli.rs | ||
| clock.rs | ||
| differential.rs | ||
| doublecheck.rs | ||
| env.rs | ||
| execution.rs | ||
| file.rs | ||
| io.rs | ||
| mod.rs | ||