Commit Graph

5808 Commits

Author SHA1 Message Date
pedrocarlo
1f2199ea44 run less tests in simulator in CI 2025-07-07 11:53:45 -03:00
pedrocarlo
d8ad4a27f8 only finish appending frames when we are done in cacheflush 2025-07-07 11:53:45 -03:00
pedrocarlo
b85687658d change instrumentation level to INFO 2025-07-07 11:53:45 -03:00
pedrocarlo
4639a4565f change max_frame count only after wal sync in cacheflush 2025-07-07 11:53:45 -03:00
pedrocarlo
46f59e4f0f add more instrumentation + add faults to shrunk plan 2025-07-07 11:53:45 -03:00
pedrocarlo
7c8737e292 do not shadow + continue the assertion on injected fault error 2025-07-07 11:53:45 -03:00
pedrocarlo
7c10ac01e6 do_allocate_page should return a Result 2025-07-07 11:53:45 -03:00
pedrocarlo
e32cc5e0d1 fix query shadowing in faulty query 2025-07-07 11:53:45 -03:00
pedrocarlo
711b1ef114 make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
pedrocarlo
5559c45011 more instrumentation + write counter should decrement if pwrite fails 2025-07-07 11:50:21 -03:00
pedrocarlo
b69472b5a3 pass correct change schema to step rollback 2025-07-07 11:50:21 -03:00
pedrocarlo
7ec47e90cc turn off tracing by default so that errors are not printed in the cli env is not set 2025-07-07 11:50:21 -03:00
pedrocarlo
89a81f9926 remove logging in test 2025-07-07 11:50:21 -03:00
pedrocarlo
9632ab0a41 rollback transaction when we fail in step 2025-07-07 11:50:21 -03:00
pedrocarlo
897426a662 add error tracing to relevant functions + rollback transaction in step_end_write_txn + make move_to_root return result 2025-07-07 11:50:21 -03:00
pedrocarlo
d82b526a5c fix infinite loop with write counter 2025-07-07 11:50:21 -03:00
pedrocarlo
5f9abb62c4 enable faulty query 2025-07-07 11:50:21 -03:00
Pekka Enberg
4a3b0bcf42 Merge 'Import subset of SQLite TCL tests' from Pekka Enberg
This implements a subset of SQLite TCL tests. Let's start fixing errors
and then import more tests!
The test cases are imported from SQLite 3.50.2.
Refs #62

Closes #1980
2025-07-07 17:20:32 +03:00
Pekka Enberg
989fdca6e3 testing/sqlite3: Import function TCL tests 2025-07-07 15:41:38 +03:00
Pekka Enberg
53070d74a4 testing/sqlite3: Import JOIN TCL tests 2025-07-07 15:41:38 +03:00
Pekka Enberg
790b0da97c testing/sqlite3: Import INSERT statement TCL tests 2025-07-07 15:41:38 +03:00
Pekka Enberg
c26adcdeb4 testing/sqlite3: Disable SELECT test that takes forever 2025-07-07 15:41:38 +03:00
Pekka Enberg
3c968df0b2 testing/sqlite3: Disable SELECT tests that require views 2025-07-07 15:41:38 +03:00
Pekka Enberg
38f3d213db testing/sqlite3: Import SELECT statement TCL tests 2025-07-07 15:41:38 +03:00
Pekka Enberg
4206fc2e23 testing/sqlite3: Add TCL tester harness 2025-07-07 15:41:38 +03:00
Pekka Enberg
931a33642e Merge 'add interactive transaction to property insert-values-select' from Pere Diaz Bou
Closes #1958
2025-07-07 14:29:02 +03:00
Pekka Enberg
f640298a6e Merge 'add pere to antithesis' from Pere Diaz Bou
Closes #1984
2025-07-07 14:28:24 +03:00
Pekka Enberg
bcfb9df6f5 Merge 'cli: Add support for .headers command' from Pekka Enberg
The `.headers` command takes `on` and `off` as parameter, supported by
SQLite, which controls whether result set header is printed in list
mode.

Closes #1983
2025-07-07 14:28:17 +03:00
Pekka Enberg
3acd0b5097 antithesis: Install procps in Docker image
Having "ps" around is pretty helpful...
2025-07-07 13:58:11 +03:00
Pere Diaz Bou
cae3a9b54e add pere to antithesis 2025-07-07 12:38:21 +02:00
Pekka Enberg
42c08b5bea cli: Add support for .headers command
The `.headers` command takes `on` and `off` as parameter, supported by
SQLite, which controls whether result set header is printed in list mode.
2025-07-07 13:24:45 +03:00
Pekka Enberg
8d844c13da Merge 'stress: add a way to run stress with indexes enabled' from Jussi Saurio
Previously all constraints were disabled with an `if false {}` hack.
In this PR:
- enable PRIMARY KEYs and UNIQUE constraints if `experimental_indexes`
compile-time feature is enabled.
- Also enable PRIMARY KEY for exactly INTEGER columns, as INTEGER
PRIMARY KEY does not require an index
- NOT NULL constraint is also now enabled in both cases, as it doesn't
require an index

Closes #1981
2025-07-07 13:18:10 +03:00
Pekka Enberg
4aa987d65c Merge 'core/translate: Unify no such table error messages' from Pekka Enberg
We're now mixing different error messages, which makes compatibility
testing pretty hard. Unify on a single, SQLite compatible error message
"no such table".

Closes #1978
2025-07-07 13:17:59 +03:00
Jussi Saurio
0762c8f780 stress: add a way to run stress with indexes enabled 2025-07-07 13:04:52 +03:00
Pere Diaz Bou
f7c6d68435 fmt 2025-07-07 08:16:21 +00:00
Pere Diaz Bou
e34058c2d7 clippy 2025-07-07 10:14:40 +02:00
Pekka Enberg
7f91768ff6 core/translate: Unify no such table error messages
We're now mixing different error messages, which makes compatibility
testing pretty hard. Unify on a single, SQLite compatible error message
"no such table".
2025-07-07 11:10:46 +03:00
Pekka Enberg
99a23330a5 testing/glob.test: Run in-memory mode
Let's run the test case with in-memory mode to avoid the (unrelated) WAL
checksum errors that we're hitting.
2025-07-07 11:09:54 +03:00
Pekka Enberg
afa0052921 Merge 'sim: add feature flags (indexes,mvcc) to CLI args' from Jussi Saurio
Closes #1979
2025-07-07 10:58:21 +03:00
Jussi Saurio
ec939eaaa9 sim: add feature flags (indexes,mvcc) to CLI args 2025-07-07 10:27:15 +03:00
Pekka Enberg
34021134fe Fix Antithesis Docker image 2025-07-06 19:19:05 +03:00
Pekka Enberg
eb95ce89d1 Merge 'Fix ScalarFunc::Glob to handle NULL and other value types' from Krishna Vishal
Previously `ScalarFunc::Glob` only handled Text based values. After this
fix it will be able to handle all types of values.
Now:
```SQL
turso> CREATE TABLE IF NOT EXISTS  t0 (c0 REAL );

turso> UPDATE t0 SET c0='C2IS*24', c0=0Xffffffffbfc4330f, c0=0.6463854797956918 WHERE ((((((((t0.c0)AND(t0.c0)))AND(0.23913649834358142)))OR(CASE t0.c0  WHEN t0.c0 THEN 'j2' WHEN t0.c0 THEN t0.c0 WHEN t0.c0 THEN t0.c0 END)))OR(((((((((t0.c0)AND(t0.c0)))AND(t0.c0)))OR(t0.c0)))AND(t0.c0))));

turso> INSERT INTO t0 VALUES (NULL);
INSERT INTO t0 VALUES ('0&');
UPDATE t0 SET c0=2352448 WHERE ((((t0.c0)GLOB(t0.c0))) NOT NULL);
turso> SELECT * from t0;
┌───────────┐
│ c0        │
├───────────┤
│           │
├───────────┤
│ 2352448.0 │
└───────────┘
```
Fixes: https://github.com/tursodatabase/turso/issues/1953

Closes #1955
2025-07-06 10:51:54 +03:00
Krishna Vishal
f322ab7ab3 Add regression test 2025-07-06 13:18:21 +05:30
Krishna Vishal
fc8403991b Fix Glob ScalarFunc to handle NULL and other Value types.
Fixes: https://github.com/tursodatabase/turso/issues/1953
2025-07-06 13:18:21 +05:30
Pekka Enberg
169af0a23e Remove .editorconfig file 2025-07-06 10:44:49 +03:00
Pekka Enberg
5dfbe8db08 Merge 'bindings/java: Merge JavaScript test suites' from Mikaël Francoeur
I modified the `better-sqlite3.spec.mjs` test suite to use the dual test
runner from https://github.com/tursodatabase/turso/pull/1941 and I
deleted the `limbo.spec.mjs` test suite, because it's now redundant.
I looked carefully at the diff between the two test suites to make sure
that we didn't lose any coverage with this change.

Closes #1959
2025-07-06 10:44:35 +03:00
Pekka Enberg
bbf938041b Fix example in README.md
We currently have indexing disabled by default, which means non-rowid
primary keys are disabled too.

Fixs #1961
2025-07-06 10:37:49 +03:00
Pekka Enberg
a833f9e33a Merge 'Add multi select test in JDBC4StatementTest' from Kim Seon Woo
In reponse to [discord discussion](https://discord.com/channels/12586588
26257961020/1385754749634084885/1390535068401012858), I thought it would
be better to add a test to show how JDBC4Statement can be used.

Closes #1962
2025-07-06 10:15:15 +03:00
김선우
c8bb2e73ec Add multi select test in JDBC4StatementTest 2025-07-05 09:36:27 +09:00
Mikaël Francoeur
38c650380c fix nvim messup 2025-07-04 11:19:27 -04:00