limbo/simulator/model
Jussi Saurio da0ec21580 fix/sim: all alter table ops must be recorded and applied in order
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).
2025-12-17 16:27:36 +02:00
..
interactions.rs sim: fix applying transaction effects 2025-12-09 13:03:53 +02:00
metrics.rs move interaction stats to metrics 2025-11-17 11:45:02 -03:00
mod.rs fix/sim: all alter table ops must be recorded and applied in order 2025-12-17 16:27:36 +02:00
property.rs - add Interaction Builder to simplify code for building an interaction. 2025-11-17 11:45:02 -03:00