Commit Graph

24 Commits

Author SHA1 Message Date
pedrocarlo
72baf48863 add random generation in simulator IO 2025-10-21 14:10:38 -03:00
pedrocarlo
294f842e62 DROP INDEX sql generation 2025-10-13 13:23:44 -03:00
Jussi Saurio
c2deee1ce5 Merge 'Simulator: ALTER TABLE' from Pedro Muniz
Adds `ALTER TABLE` to the simulator. Currently, there are no properties
that generate `ALTER TABLE`. The query is only generated in
`Property::Query` or in extension queries.
Conditions to generate `ALTER TABLE`:
- In differential testing, do not generate `ALTER COLUMN` as SQLite does
not support it.
- If there is only 1 column, or all columns are present in indexes, do
not generate a `DROP COLUMN` as it would be an error in the database
- if there are no tables, obviously do not generate `ALTER TABLE`
Some fixes:
- handle NULL generation in `GTValue` and `LTValue`, as we now have to
handle nulls due to `ADD COLUMN` adding cols with NULL
- correctly compare NULLs in `binary_compare`

Closes #3650
2025-10-13 14:16:49 +03:00
Pekka Enberg
bd97c117ed whopper: Remove debug printouts 2025-10-13 12:19:09 +03:00
pedrocarlo
9c2edbb8b7 create separate Index struct for sql generation 2025-10-13 02:04:15 -03:00
pedrocarlo
642ec3032d use parser's ColumnDefinition for Sql Generation Column struct 2025-10-09 17:25:04 -03:00
Avinash Sajjanshetty
68425fbe92 Fix whopper to work with encryption flag 2025-10-02 15:26:35 +05:30
Avinash Sajjanshetty
a360efa6e0 enable encryption feature flag by default 2025-09-30 19:04:25 +05:30
Diego Reis
7a56c93b81 Makes clippy happy 2025-09-25 10:42:14 -03:00
Avinash Sajjanshetty
56a5069647 end sim test if the size exceeds soft limit 2025-09-19 12:56:47 +05:30
Avinash Sajjanshetty
6c49af34e4 Update IO to track file sizes 2025-09-19 12:47:26 +05:30
Avinash Sajjanshetty
94e7f6defc Update whopper run and explore scripts 2025-09-17 21:58:54 +05:30
Avinash Sajjanshetty
10137ffaa4 run whopper with encryption if arg is passed 2025-09-17 21:58:27 +05:30
Pekka Enberg
cf0480e469 whopper: Handle write-write conflict
Write-write conflict is not an error that stops the simulation. Note
that the transaction is rolled back automatically.
2025-09-16 17:58:33 +03:00
pedrocarlo
3c91ae206b move as many dependencies as possible to workspace to avoid multiple versions of the same dependency 2025-09-15 17:19:36 -03:00
Pekka Enberg
bc4aa63203 Merge 'make whopper run with checksums' from Avinash Sajjanshetty
pass `--enable-checksums` to either `run` or `explore` commands

Closes #3100
2025-09-14 18:26:12 +03:00
Avinash Sajjanshetty
d35789690e make whopper run with checksums
pass `--enable-checksums` to either `run` or `explore` commands
2025-09-14 20:08:34 +05:30
Pekka Enberg
1bdfabcac7 whopper: Generate different transaction modes with MVCC 2025-09-14 13:55:08 +03:00
Pekka Enberg
5783e3edf8 whopper: Add "--enable-mvcc" command line option 2025-09-14 13:15:52 +03:00
Pekka Enberg
db190c9e3d whopper: Add "--disable-indexes" option
MVCC does not support indexes so let's add an option to disable that.
2025-09-14 13:13:49 +03:00
Pekka Enberg
89d1c9a421 whopper: Switch to mmap2 crate to fix Windows build 2025-09-11 08:35:18 +03:00
Pekka Enberg
c5ca259abc whopper: Run cargo clippy --fix 2025-09-11 08:35:18 +03:00
Pekka Enberg
ae920c435d whopper: Ragnarök mode with cosmic rays 2025-09-11 08:35:18 +03:00
Pekka Enberg
a9694c87b1 whopper: A new DST with concurrency
This is a new deterministic simulator for Turso that focuses on finding
concurrency bugs.

You can run whopper with:

```console
penberg@vonneumann turso % SEED=1234 ./whopper/bin/run
   Compiling turso_whopper v0.1.5-pre.3 (/Users/penberg/src/tursodatabase/turso/whopper)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.22s
seed = 1234
       .             I/U/D/C
       .             44/19/11/2
       .             68/33/21/2
       |             104/51/29/3
       |             121/69/41/3
      ╱|╲            150/84/51/3
     ╱╲|╱╲           184/97/59/3
    ╱╲╱|╲╱╲          199/105/64/4
   ╱╲╱╲|╱╲╱╲         206/115/69/5
  ╱╲╱╲╱|╲╱╲╱╲        234/138/82/6
 ╱╲╱╲╱╲|╱╲╱╲╱╲       269/164/91/7
```
2025-09-11 08:35:18 +03:00