Commit Graph

64 Commits

Author SHA1 Message Date
Glauber Costa
7e76970035 fix: Handle fresh INSERTs in materialized view incremental maintenance
The op_insert function was incorrectly trying to capture an "old record"
for fresh INSERT operations when a table had dependent materialized views.
This caused a "Cannot delete: no current row" error because the cursor
wasn't positioned on any row for new inserts.

The issue was introduced in commit f38333b3 which refactored the state
machine for incremental view handling but didn't properly distinguish
between:
- Fresh INSERT operations (no old record exists)
- UPDATE operations without rowid change (old record should be captured)
- UPDATE operations with rowid change (already handled by DELETE)

This fix checks if cursor.rowid() returns a value before attempting to
capture the old record. If no row exists (fresh INSERT), we correctly
set old_record to None instead of erroring out.

I am also including tests to make sure this doesn't break. The reason I
didn't include tests earlier is that I didn't know it was possible to
run the tests under a flag. But in here, I am just adding the flag to
the execution script.
2025-08-13 06:41:14 -05:00
PThorpe92
213d589dd1 Apply review suggestions, remove FreeEntry 2025-08-08 11:07:29 -04:00
PThorpe92
2e072cadb0 Add CI=true env var so the tests dont each allocate 4mb by default 2025-08-08 10:55:26 -04:00
Pekka Enberg
6ccee4267b Add sync package to scripts/update-version.py 2025-08-08 16:50:02 +03:00
PThorpe92
84900c4da2 Check repository scope in merge pr script 2025-07-31 11:39:57 -04:00
PThorpe92
ca383a3b88 Fix merge-py.py script to use github CLI and add makefile command 2025-07-31 10:20:17 -04:00
PThorpe92
ab22dafbe1 Fix merge_pr.py script to avoid marking contributor PRs as closed 2025-07-30 22:49:57 -04:00
Pekka Enberg
2d2f416e2c Revert "bindings/javascript: Add optional dependencies"
This reverts commit 9d7a77efde. It does
not work because the native packages don't yet exists at that point.
Let's fix the Github workflows instead.
2025-07-29 12:36:12 +03:00
Pekka Enberg
9d7a77efde bindings/javascript: Add optional dependencies 2025-07-29 12:15:43 +03:00
Diego Reis
98bec9868b Remove wasm binding
With napi v3 we can compile our javascript binding to wasm, which can
reduce a lot of maintenance overhead and complexity
2025-07-28 14:48:51 -03:00
Pekka Enberg
7c70e8274f antithesis: Run experiments for 8 hours
Eric from Antithesis pointed out that we can still find more states by
running for longer, so let's try that.
2025-07-10 19:37:45 +03:00
Jussi Saurio
f312227825 uv run ruff format && uv run ruff check --fix 2025-07-09 10:06:29 +03:00
Pekka Enberg
1e9fd7d5ed Add scripts/gen-changelog.py 2025-07-09 09:27:09 +03:00
pedrocarlo
81f80edd4a remove experimental_flag from script + remove -q flag default flag from TestTursoShell 2025-07-07 15:34:03 -03:00
pedrocarlo
79660f268f rust pass arguments to run-sim 2025-07-07 12:23:00 -03:00
pedrocarlo
1f2199ea44 run less tests in simulator in CI 2025-07-07 11:53:45 -03:00
Pekka Enberg
4206fc2e23 testing/sqlite3: Add TCL tester harness 2025-07-07 15:41:38 +03:00
Pekka Enberg
9e92325bad antithesis: Make experiments run for longer
...increases probability of Antithesis finding interesting things.
2025-07-03 15:58:49 +03:00
Pekka Enberg
9c5ee9fec1 scripts/publish-crates.sh: s/limbo/turso/ 2025-06-30 10:59:25 +03:00
Pekka Enberg
c9945950e8 core: Remove dependencies to extensions
We don't want to publish all extensions on crates.io, at least not for now.
2025-06-30 10:01:03 +03:00
Pekka Enberg
39fd84f297 Move time extension to core 2025-06-30 10:01:03 +03:00
Pekka Enberg
12131babae Move UUID extension to core
We want to bundle the UUID extension by default so move the code to core.
2025-06-30 09:54:13 +03:00
Pekka Enberg
d377f4c948 Move completion extension dependency to CLI
We never need it in core anyway.
2025-06-29 13:32:17 +03:00
Pekka Enberg
725c3e4ddc Rename limbo_sqlite3_parser crate to turso_sqlite3_parser 2025-06-29 12:34:46 +03:00
Pekka Enberg
eb0de4066b Rename limbo_ext crate to turso_ext 2025-06-29 12:14:08 +03:00
Pekka Enberg
eec994386b Rename limbo_macros to turso_macros 2025-06-29 12:00:17 +03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
Pekka Enberg
67809233d4 github: Run simulator on pull requests 2025-06-29 09:26:14 +03:00
Pekka Enberg
a539c557d6 scripts/update-version.py: s/Limbo/Turso/ 2025-06-27 12:56:06 +03:00
Pekka Enberg
e162b56d01 Merge 'Rename Limbo to Turso Database' from Pekka Enberg
Closes #1835
2025-06-26 21:35:48 +03:00
Pekka Enberg
662615a7ad antithesis: Fix endpoint name too
Spotted by Eric Dinh from Antithesis.
2025-06-26 21:28:10 +03:00
Pekka Enberg
018b17b6f2 Rename Limbo to Turso Database 2025-06-26 21:05:02 +03:00
Pekka Enberg
9620c0cd8b antithesis: Fix experiment duration parameter for launch.sh
The endpoint changed on Antithesis side to avoid the complaint about not
joining a network so let's adjust the script.
2025-06-26 20:28:58 +03:00
Pekka Enberg
2fc5c0ce5c Switch to runtime flag for enabling indexes
Makes it easier to test the feature:

```
$ cargo run --  --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
Pekka Enberg
6c8aa4e043 antithesis: Run experiment for 60 minutes 2025-06-24 14:16:09 +03:00
pedrocarlo
80ccca8827 ruff lint fix 2025-06-20 15:59:03 -03:00
Pekka Enberg
b33b4edc5f scripts: Use ANTITHESIS_REGISTRY_KEY for Antithesis login
We can now use that as Github actions secret too.
2025-06-19 14:22:24 +03:00
Pere Diaz Bou
9ae4563bcd index_experimental flag to enable index usages
Currently indexes are the bulk of the problem with `UPDATE` and
`DELETE`, while we work on fixing those it makes sense to disable
indexing since they are not stable. We want to try to make everything
else stable before we continue with indexing.
2025-06-17 19:33:23 +02:00
Jussi Saurio
7e16c235af Clear test db's WAL too in clone_test_db.sh 2025-05-26 22:00:39 +03:00
Piotr Rzysko
ad9d044a04 Add CSV extension 2025-05-21 09:22:59 +02:00
PThorpe92
f128887348 Add script to create clone of testing/testing.db to allow for writes in tests 2025-05-17 16:11:16 -04:00
Pekka Enberg
31677c9c94 scripts/antithesis: Build Docker image for x86-64 2025-04-24 20:55:30 +03:00
Jussi Saurio
3bbd443286 python: add UV project for 'scripts'
mainly so i don't have to install pygithub every time i want to
`uv run scripts/merge-pr.py`
2025-04-23 10:32:38 +03:00
PThorpe92
570253b29f Adjust limbo run script to log to file during tests if RUST_LOG set 2025-04-08 19:32:51 -04:00
Pekka Enberg
4342438801 scripts: Add more npm packages to update-version.py 2025-04-03 10:43:28 +03:00
Pekka Enberg
d9562a3d82 Add update-version.py script
Simplifies version bumping.
2025-04-02 09:31:28 +03:00
Pekka Enberg
7832ae22df Enable pretty mode in shell by default
Fixes #929
2025-03-22 08:10:26 +02:00
Pekka Enberg
52b546ff64 Add limbo_ext_tests to crates 2025-03-19 19:00:12 +02:00
Pekka Enberg
4a3cbd6fa3 Add limbo_completion to crates 2025-03-19 18:58:21 +02:00
Pekka Enberg
acf0fb4425 scripts: Add missing parser crate to publish-crates.sh 2025-03-05 16:56:50 +02:00