Commit Graph

10193 Commits

Author SHA1 Message Date
Jussi Saurio
ebc4ddb2a2 Merge 'Simulator: fix alter table shadowing to modify index column name ' from Pedro Muniz
Forgot to modify the column name referenced in the indexes when
shadowing

Reviewed-by: bit-aloo (@Shourya742)

Closes #3712
2025-10-14 07:25:29 +03:00
Jussi Saurio
a710d2f124 Merge 'Simulator: Drop Index' from Pedro Muniz
Added the ability for us to generate `Drop Index` queries in the
simulator. Most of the code is just boilerplate and some checks to make
sure we do not generate `Drop Index` when we have no indexes to drop

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Reviewed-by: bit-aloo (@Shourya742)

Closes #3713
2025-10-14 07:25:02 +03:00
Jussi Saurio
61109963fc Merge 'fix backwards compatible rowid alias behaviour' from Pedro Muniz
Closes #3665

Closes #3723
2025-10-14 07:24:42 +03:00
pedrocarlo
83dde9b55c fix backwards compatible rowid alias behaviour 2025-10-13 20:41:45 -03:00
pedrocarlo
45567e6837 fix alter table shadowing to modify index column name on rename and alter 2025-10-13 14:02:26 -03:00
pedrocarlo
bfeccf6543 integrate DropIndex in query generator 2025-10-13 13:56:36 -03:00
pedrocarlo
b2e54d9816 add Drop Index to simulator model 2025-10-13 13:32:16 -03:00
pedrocarlo
294f842e62 DROP INDEX sql generation 2025-10-13 13:23:44 -03:00
Pekka Enberg
42de657b5c Merge 'Fix typo in manual.md' from Yevhen Kostryka
In `SELECT` section there is `GROU BY` instead of `GROUP BY`

Closes #3710
2025-10-13 18:55:07 +03:00
Yevhen Kostryka
08efce510e Fix typo in manual.md
In `SELECT` section there is `GROU BY` instead of `GROUP BY`
2025-10-13 18:45:31 +03:00
Pekka Enberg
1c9eaa3d95 Merge 'Restrict joins to max 63 tables and allow arbitrary number of table columns' from Jussi Saurio
Closes #2076
Closes #2075

Closes #3705
2025-10-13 18:23:11 +03:00
Jussi Saurio
c54e150a52 Merge 'Fix: Table entry is not removed from sqlite_schema when a table is dropped' from
Fixes #3682 .
Ignore case of table name when dropping table.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3683
2025-10-13 15:02:29 +03:00
Jussi Saurio
c12c1db275 Merge 'Simulator: persist files in sim memory IO for integrity check' from Pedro Muniz
If we don't persist the files, rusqlite will open an empty file and
perform integrity check on it.

Reviewed-by: bit-aloo (@Shourya742)

Closes #3676
2025-10-13 14:23:53 +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
Jussi Saurio
2baea154b0 clippy 2025-10-13 14:11:18 +03:00
Jussi Saurio
3669437482 Add vibecoded tests for ColumnUsedMask 2025-10-13 14:03:34 +03:00
Jussi Saurio
e055ed9a8d Allow arbitrarily many columns in a table
Use roaring bitmaps because ColumnUsedMask is likely to be
sparsely populated.
2025-10-13 13:30:26 +03:00
Jussi Saurio
59a1c2ae2e Disallow joining more than 63 tables
Returns an error instead of panicing
2025-10-13 13:30:03 +03:00
Pekka Enberg
bd97c117ed whopper: Remove debug printouts 2025-10-13 12:19:09 +03:00
Pekka Enberg
77492641db Merge 'Move all checksum tests behind the feature flag' from Avinash Sajjanshetty
Closes #3704
2025-10-13 11:46:56 +03:00
Avinash Sajjanshetty
4a29694475 rename checksums tests appropriately 2025-10-13 13:48:07 +05:30
Avinash Sajjanshetty
ee479d2e52 Move all checksum tests behind the feature flag 2025-10-13 13:47:25 +05:30
Pekka Enberg
9e7c1e9061 Merge 'core/vdbe: Improve IdxDelete error messages with context' from Pekka Enberg
We currently return the exact same error from two different IdxDelete
paths. Improve the messages with context about what we're doing to make
this error more debuggable.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3699
2025-10-13 10:19:08 +03:00
Pekka Enberg
9eeefa27e9 Merge 'stress: Add busy timeout support with 5 second default' from Pekka Enberg
Add `--busy-timeout` command-line option to turso-stress with a default
value of 5000 ms. This helps prevent spurious database busy errors
during concurrent stress testing and ensure that integrity checks are
not skipped because of concurrent writes.

Closes #3696
2025-10-13 10:19:01 +03:00
Pekka Enberg
49bf81ab8b Merge 'Add WINDOW functions to COMPAT.md' from Jussi Saurio
Closes #3701
2025-10-13 10:18:54 +03:00
Jussi Saurio
171bcd83ec COMPAT.MD: note about WINDOW functions 2025-10-13 10:16:13 +03:00
Pekka Enberg
2a02cafc73 core/vdbe: Improve IdxDelete error messages with context
We currently return the exact same error from two different IdxDelete
paths. Improve the messages with context about what we're doing to make
this error more debuggable.
2025-10-13 09:42:04 +03:00
Pekka Enberg
7b1b37095d stress: Add busy timeout support with 5 second default
Add `--busy-timeout` command-line option to turso-stress with a default
value of 5000 ms. This helps prevent spurious database busy errors
during concurrent stress testing and ensure that integrity checks are
not skipped because of concurrent writes.
2025-10-13 09:11:10 +03:00
Pekka Enberg
eb000c3d0f Merge 'core/translate: Add if alias and allow iff to have more arguments' from Pavan Nambi
closes #3689

Closes #3690
2025-10-13 08:53:00 +03:00
pedrocarlo
c0f35cc17d disable ALTER COLUMN due to incompatibility with SQLITE INTEGRITY CHECK 2025-10-13 02:34:43 -03:00
pedrocarlo
773fa28063 workaround in sqlite for schema changes become visible to other connections 2025-10-13 02:34:43 -03:00
pedrocarlo
dca1137f81 rusqlite stop trying to get rows when we error with InvalidColumnIndex 2025-10-13 02:34:43 -03:00
pedrocarlo
d99e3f590f ALTER TABLE should be added to is_ddl 2025-10-13 02:34:43 -03:00
pedrocarlo
5f65196115 fix load_bug 2025-10-13 02:34:43 -03:00
pedrocarlo
b6c5fee300 do not count certain interactions in the InteractionPlan and correctly report the length when shrinking 2025-10-13 02:34:43 -03:00
pedrocarlo
49e96afd39 generate ALTER COLUMN 2025-10-13 02:34:43 -03:00
pedrocarlo
a18a472685 add option to disable alter column for differential testing 2025-10-13 02:34:43 -03:00
pedrocarlo
ca8be11a56 fix binary compare in simulator by taking into account NULL for certain compare ops 2025-10-13 02:34:43 -03:00
pedrocarlo
703efaa724 adjust Properties to skip Alter Table in certain conditions 2025-10-13 02:34:43 -03:00
pedrocarlo
a149e55209 fix Drop Column to only be generated if no columns conflict in Indexes 2025-10-13 02:34:43 -03:00
pedrocarlo
9c2edbb8b7 create separate Index struct for sql generation 2025-10-13 02:04:15 -03:00
pedrocarlo
ab152890dd adjust generation of GTValue and LTValue to accomodate for Null Values 2025-10-13 02:04:15 -03:00
pedrocarlo
c072058e4b add Alter Table query generation in Sim 2025-10-13 02:04:15 -03:00
pedrocarlo
230755eb2e shadow for AlterTable 2025-10-13 02:04:15 -03:00
Pavan-Nambi
e1f23aeb2c fmt and add tests 2025-10-12 22:23:04 +05:30
Pavan-Nambi
3491e1f42e add if alais and allow iff to have more arguments 2025-10-12 22:17:35 +05:30
Pekka Enberg
7221f79a2f Merge 'Stop ignoring table's max value incase of a manual update in autoincrement.' from Pavan Nambi
closes https://github.com/tursodatabase/turso/issues/3664

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #3668
2025-10-12 18:38:13 +03:00
Pekka Enberg
487a1772fc Merge 'Fix disallow reserved prefixes in ALTER TABLE RENAME TO' from xmchx
Closes #3574

Closes #3663
2025-10-12 18:37:44 +03:00
Pekka Enberg
3fafc23d96 Merge 'Nyrkiö nightly: Reduce frequency to 1 per 24h' from Henrik Ingo
Also fix a missed path in sqlite3 tests

Closes #3685
2025-10-12 18:37:25 +03:00
Henrik Ingo
00bde0d52a Nyrkiö nightly: Reduce frequency to 1 per 24h
Also fix a missed path in sqlite3 tests
2025-10-12 13:46:26 +03:00