Commit graph

1163 commits

Author SHA1 Message Date
Jussi Saurio
0887ebef7d Merge 'ci: run TCL tests for MVCC under CI' from Pere Diaz Bou
Some checks are pending
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
## Description
Run TCL tests for MVCC in the CI. Right now almost everything is
commented out as we need to fix them.
## AI Disclosure
No
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds CI step to run MVCC TCL tests via a custom sqlite wrapper with
experimental flags, and narrows the MVCC test suite to known passing
tests.
>
> - **CI**:
>   - Add `Test mvcc` step in `test-limbo` job to run `make test-compat-
mvcc` in `.github/workflows/rust.yml`.
> - **Makefile**:
>   - Update `test-compat-mvcc` to use `SQLITE_EXEC=scripts/turso-mvcc-
sqlite3`.
> - **Test Runner Script** (`scripts/turso-mvcc-sqlite3`):
>   - Enable experimental flags: `--experimental-mvcc`, `--experimental-
views`, `--experimental-strict`.
> - **Tests**:
>   - Define `testing/all-mvcc.test` with a subset of passing test
files; comment out failing ones.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ee48302e30. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

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

Closes #4178
2025-12-11 23:39:05 +02:00
Jussi Saurio
e67cc999f3 Add run-sqlancer.sh script to run sqlancer using Turso java bindings 2025-12-11 17:18:11 +02:00
Jussi Saurio
82fbc3e0fa fix: INSERT OR IGNORE with NOT NULL constraint failure 2025-12-11 17:18:11 +02:00
Pere Diaz Bou
e048a48bee ci: run TCL tests for MVCC under CI 2025-12-11 11:57:32 +01:00
Preston Thorpe
fd2a03dbdc
Merge 'fix: JSON_INSERT now correctly inserts new keys in nested objects' from Mikaël Francoeur
Some of the tests that were added pass only on this branch. I was
surprised to see that there didn't seem to be any TCL tests for
`json_insert()`.
## AI-generated description
When using JSON_INSERT with a path like '$.a.b.d' on an object like
'{"a": {"b": {"c": 5}}}', the function was incorrectly returning the
input unchanged instead of inserting the new key.
The root cause was that InsertNew mode was being applied to all path
segments. The fix uses Upsert mode for intermediate segments and only
applies InsertNew for the final segment.
🤖 Generated with [Claude Code](https://claude.com/claude-code), and
cleaned up by Mikaël
## AI Disclosure
This was written by Claude, and then I cleaned it up manually.

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

Closes #4166
2025-12-10 14:55:07 -05:00
Mikaël Francoeur
b3f0947acd
fix: JSON_INSERT now correctly inserts new keys in nested objects
When using JSON_INSERT with a path like '$.a.b.d' on an object like
'{"a": {"b": {"c": 5}}}', the function was incorrectly returning the
input unchanged instead of inserting the new key.

The root cause was that InsertNew mode was being applied to all path
segments. The fix uses Upsert mode for intermediate segments and only
applies InsertNew for the final segment.

🤖 Generated with [Claude Code](https://claude.com/claude-code), and cleaned up by Mikaël
2025-12-10 13:58:58 -05:00
PThorpe92
bb7b8aa935
Add/expand tcl tests for analyze 2025-12-09 20:02:07 -05:00
PThorpe92
fe38b006f7
Update analyze TCL tests 2025-12-09 14:46:12 -05:00
Preston Thorpe
9e75e23eb6
Merge 'feat: adding check for unquoted literals in values()' from Rohith Suresh
Some checks are pending
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Python / configure-strategy (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Closes #3949
Closes #4018
```
turso> values(asdf);
  × Parse error: Unquoted identifier in VALUES clause: asdf
  
turso> select * from users;
┌────┬──────┐
│ id │ name │
├────┼──────┤
│  1 │ jack │
├────┼──────┤
│  2 │ jill │
└────┴──────┘
  turso> select id, (values(name)) as name_again from users;
┌────┬────────────┐
│ id │ name_again │
├────┼────────────┤
│  1 │ jack       │
├────┼────────────┤
│  2 │ jill       │
└────┴────────────┘
```

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

Closes #4003
2025-12-09 10:15:11 -05:00
Jussi Saurio
0156fa55b6
Merge ' tcl,makefile: add tcl test infraestructure for mvcc ' from Pere Diaz Bou
The idea is to have a custom `all-mvcc.test` so we can add `.test` files
that we expect to work with MVCC. In cases where files are not enough we
have  `is_turso_mvcc` to check if we want to run a test.
For example we skip partial index tests like this:
```
if {![is_turso_mvcc]} {
    do_execsql_test_on_specific_db {:memory:} autoinc-conflict-on-nothing {
        CREATE TABLE t (id INTEGER PRIMARY KEY AUTOINCREMENT, k TEXT);
        CREATE UNIQUE INDEX idx_k_partial ON t(k) WHERE id > 1;
        INSERT INTO t (k) VALUES ('a');
        INSERT INTO t (k) VALUES ('a');
        INSERT INTO t (k) VALUES ('a') ON CONFLICT DO NOTHING;
        INSERT INTO t (k) VALUES ('b');
        SELECT * FROM t ORDER BY id;
    } {1|a 2|a 4|b}
}
```
`test-mvcc-compat` is not run under CI for now as we need to fix every
test anyways so no point in making every PR fail for now.

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

Closes #4139
2025-12-09 09:40:20 +02:00
Pere Diaz Bou
c5f6c3d5c0 tcl,makefile: add tcl test infraestructure for mvcc 2025-12-08 18:05:45 +01:00
Jussi Saurio
027ebe33fe Fix descending index scan returning rows when seek key is NULL
Take e.g.

CREATE TABLE t(x); CREATE INDEX txdesc ON t(x desc);
INSERT INTO t values (1),(2),(3);

SELECT * FROM t WHERE x > NULL;

--

Our plan, like Sqlite, was to start iterating the descending index
from the beginning (Rewind) and stop once we hit a row where x is
<= than NULL using `IdxGe` instruction (GE in descending indexes
means LE).

However, `IdxGe` and other similar instructions use a sort comparison
where NULL is less than numbers/strings etc, so this would incorrectly
not jump.

Fix: we need to emit an explicit NULL check after rewinding.
2025-12-08 13:19:58 +02:00
Jussi Saurio
40898b8cf9
Merge 'Added dot product vector distance' from Tejas
Closes #3826
This PR adds dot product distance implementation.

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

Closes #4055
2025-12-08 06:24:39 +02:00
Jussi Saurio
33db726f37
Merge 'Run BEFORE and AFTER update triggers on upserts' from Mikaël Francoeur
After this fix, I ran the fuzz test for more than an hour with no
issues.
Closes https://github.com/tursodatabase/turso/issues/4075
## AI disclosure
Claude wrote the implementation and tests from just a copy/paste of the
Github issue.

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

Closes #4119
2025-12-08 06:21:28 +02:00
Jussi Saurio
2f5ea507e5
Merge 'Allocate Page 1 in pager on open' from Pedro Muniz
For an empty database, SQLite has the database header in memory on
startup. We will need to also have the Database Header on startup to
check if the DB is in WAL or MVCC mode. So this is necessary for #3536.
The major changes here is that we don't have a `DbState` variable
anymore, and instead with have an `init_page_1` that holds an in-memory
page1 that is flushed to disk on a `WriteTx`. In my opinion, this change
also reduced the complexity of our initialization process
Closes #3441

Reviewed-by: Mikaël Francoeur (@LeMikaelF)
Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #4092
2025-12-08 06:19:49 +02:00
Mikaël Francoeur
dc3cd84a70
Prevent creating index on rowid pseudo-column
SQLite rejects `CREATE INDEX idx ON t(rowid)` with "no such column: rowid"
because rowid is a pseudo-column, not an actual column. Limbo was
incorrectly allowing this.

The fix removes the special exception for ROWID_STRS (rowid, _rowid_, oid)
in validate_index_expression(). Now these identifiers are only allowed
if they match an actual column name in the table (i.e., when shadowed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 16:10:51 -05:00
Mikaël Francoeur
d53fc5a6e2
run BEFORE and AFTER update triggers on upserts 2025-12-06 15:20:24 -05:00
pedrocarlo
d4919abd77 add some tests 2025-12-05 19:44:28 -03:00
Tejasmadhukar
88157f75bc
added tcl tests 2025-12-06 00:01:17 +05:30
Jussi Saurio
e0791406b5 Fix two bugs with compound selects
1. Previously compound select would not start a transaction if
   the rightmost subselect had no table references, e.g.
   SELECT * FROM t UNION VALUES(1)

2. Previously the column names for the query were taken from the
   rightmost subselect - instead, they should be taken from the
   leftmost subselect.
2025-12-05 17:14:58 +02:00
PThorpe92
c0d35dbaba
Add some additional join tests with nulls for new bloom filter behavior 2025-12-04 16:09:49 -05:00
PThorpe92
06cbe8c063
Add more py tests for hash joins 2025-12-04 16:09:47 -05:00
PThorpe92
bc5406be04
Add memory py tests for hash spilling, fix/finish spilling impl in hashtable 2025-12-04 16:09:46 -05:00
PThorpe92
17dd5da767
Add some TCL tests for hash joins 2025-12-04 16:09:45 -05:00
PThorpe92
61038469d5
Add TCL regression test 2025-12-04 15:06:40 -05:00
Preston Thorpe
020015da76
Merge 'Col name in trigger subquery' from Rohith Suresh
Some checks are pending
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Fixes #4030
```
turso> CREATE TABLE t (
    a INTEGER,
    b TEXT
);

CREATE TABLE t1 (
    x INTEGER,
    y TEXT
);

CREATE TRIGGER trg
AFTER UPDATE ON t1
BEGIN
    INSERT INTO t
    SELECT * FROM t
    WHERE t.a = 42;
END;
insert into t VALUES (42, 'abc');
INSERT INTO t1 VALUES (0, '');

UPDATE t1 SET y = 'z' WHERE TRUE;
turso> select * from t union all select * from t1;
┌────┬─────┐
│ x  │ y   │
├────┼─────┤
│ 42 │ abc │
├────┼─────┤
│ 42 │ abc │
├────┼─────┤
│  0 │ z   │
└────┴─────┘
```
```
sqlite> CREATE TABLE t (
(x1...>     a INTEGER,
(x1...>     b TEXT
(x1...> );
sqlite> 
sqlite> CREATE TABLE t1 (
(x1...>     x INTEGER,
(x1...>     y TEXT
(x1...> );
sqlite> 
sqlite> CREATE TRIGGER trg
   ...> AFTER UPDATE ON t1
   ...> BEGIN
   ...>     INSERT INTO t
   ...>     SELECT * FROM t
   ...>     WHERE t.a = 42;
   ...> END;
sqlite> insert into t VALUES (42, 'abc');
sqlite> INSERT INTO t1 VALUES (0, '');
sqlite> 
sqlite> UPDATE t1 SET y = 'z' WHERE TRUE;
sqlite> select * from t union all select * from t1;
42|abc
42|abc
0|z
```

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

Closes #4058
2025-12-02 17:11:33 -05:00
Mikaël Francoeur
751853aff1
fix large number comparison across types 2025-12-01 17:37:48 -05:00
Mikaël Francoeur
d93d466c6d
compare as i64 if possible 2025-12-01 17:37:48 -05:00
RS2007
b6b47ac04a adding tests 2025-11-29 23:04:32 +05:30
PThorpe92
ed579fbdf2
Add TCL tests for quote scalar function w/ blob type 2025-11-27 20:59:23 -05:00
Jussi Saurio
fa188885d5
Merge 'Ensure LIKE is case-sensitive for non-ASCII characters' from Tejas
Some checks are pending
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Closes #3318
LIKE(X,Y) is now case-sensitive for characters that are beyond ASCII
range.
I did not make any change in LIKE(X,Y,Z), please let me know if I should
do that!

Closes #3902
2025-11-27 21:56:03 +02:00
Jussi Saurio
1ee4b3584c
Merge 'add alias to colnames explicitly as column-N' from Pavan Nambi
closes https://github.com/tursodatabase/turso/issues/3950
refer - f1928b3e54
63449079e2542c/src/select.c#L2306

Closes #3982
2025-11-27 21:54:21 +02:00
Pavan-Nambi
9375a5671d
don't allow triggers on system tables 2025-11-26 07:43:15 +05:30
Jussi Saurio
fd6ef66a14
Merge 'drop triggers if table drops' from Pavan Nambi
seed: 3038621321660758567

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

Closes #4005
2025-11-25 07:56:12 +02:00
Pavan-Nambi
bad9dce789
add alias to colnames explicitly as column-N 2025-11-25 07:55:50 +05:30
Pavan-Nambi
8024bb3bde
add tests 2025-11-25 07:51:41 +05:30
Pekka Enberg
9bf6e6efd9
Merge 'use i64 for registers p1,p2,p3,p5 in EXPLAIN output' from Mikaël Francoeur
To avoid overflows, use i64 for p1,p2,p3,p5 in EXPLAIN output. This
matches SQLite's behaviour (https://github.com/sqlite/sqlite/blob/master
/src/vdbeaux.c#L2460-L2476).
I also changed the column type string for p4, there was a preexisting
mismatch between the value type and the explicit type string.
Closes https://github.com/tursodatabase/turso/issues/3944

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

Closes #3961
2025-11-23 09:47:22 +02:00
RS2007
f9422f7211 tests passing 2025-11-23 13:04:44 +05:30
RS2007
e23d537445 fixing tests 2025-11-23 13:02:31 +05:30
RS2007
5c8d56ec1d feat: fixing name resolution for identifiers inside VALUES() 2025-11-23 12:14:56 +05:30
Preston Thorpe
a97081eafe
Merge 'translate/planner: Implement Index creation on arbitrary expressions' from Preston Thorpe
Some checks are pending
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
This PR implements the functionality to create an index on an expression
instead of just a column, and makes an attempt for the planner to be
able to use these indexes.
https://sqlite.org/expridx.html
This adds the field:
`expr: Option<Box<Expr>>` to `IndexedColumn`
which is `None` for regular indexed columns.
This also adds the sentinel value `EXPR_INDEX_SENTINEL` for the
`position_in_table` field of indexed col expressions, since they are
not, actually in the table.. and similarly: `Constraint` now has the
`table_col_position` as an Option now, because it is no longer a
guarantee that it refers to a col expression.

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

Closes #3990
2025-11-22 06:52:20 -05:00
PThorpe92
2688f8b9c3
Add tcl tests for expr indexes and collation 2025-11-20 12:47:49 -05:00
Nikita Sivukhin
0c1e2a8a10 fix test 2025-11-20 18:03:32 +04:00
Nikita Sivukhin
b08374be46 support table_xinfo pragma 2025-11-20 17:38:10 +04:00
Tejasmadhukar
ebbe7bab9e
Added tests 2025-11-18 22:14:09 +05:30
Tejas
8eedee3644
Merge branch 'main' into fix/like-folding 2025-11-18 19:00:55 +05:30
Jussi Saurio
5c1ebbd011 Use VecDeque for trigger storage for similar reasons as indexes do 2025-11-18 15:19:01 +02:00
Jussi Saurio
e1dee4a072 triggers: add a lot of different kinds of tests 2025-11-18 15:19:01 +02:00
PThorpe92
b83921d838
Add TCL tests for insert or replace handling 2025-11-17 08:23:16 -05:00
PThorpe92
5bff10c56e
Implement INSERT OR REPLACE translation/emission 2025-11-17 08:23:10 -05:00