Commit graph

236 commits

Author SHA1 Message Date
Pekka Enberg
931a33642e Merge 'add interactive transaction to property insert-values-select' from Pere Diaz Bou
Some checks are pending
JavaScript / stable - aarch64-apple-darwin - node@20 (push) Waiting to run
JavaScript / stable - x86_64-apple-darwin - node@20 (push) Waiting to run
JavaScript / stable - x86_64-pc-windows-msvc - node@20 (push) Waiting to run
JavaScript / stable - x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
JavaScript / Test bindings on x86_64-apple-darwin - node@20 (push) Blocked by required conditions
JavaScript / Test bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
JavaScript / Build universal macOS binary (push) Blocked by required conditions
JavaScript / 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-x86_64 (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-wasm (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (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 / 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 #1958
2025-07-07 14:29:02 +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
Jussi Saurio
ec939eaaa9 sim: add feature flags (indexes,mvcc) to CLI args 2025-07-07 10:27:15 +03:00
Pere Diaz Bou
897f13c173 add interactive transaction to property insert-values-select 2025-07-04 15:50:46 +02:00
pedrocarlo
251926cd79 leave io faults and fsync query disabled by default 2025-06-30 12:36:26 -03:00
pedrocarlo
4a32f83bd0 add cli option to disable faulty query 2025-06-29 15:56:03 -03:00
pedrocarlo
119c537334 add FaultyQuery Property to inject fault in a query and then assert that it did not modify the database 2025-06-29 15:54:27 -03:00
pedrocarlo
b578f2249a add FaultyQuery 2025-06-29 14:22:11 -03:00
pedrocarlo
ac34928d53 fix delete shadowing + build result rows from fsync query 2025-06-29 12:44:13 -03:00
pedrocarlo
fcabc18bbc add description to property 2025-06-29 12:40:53 -03:00
pedrocarlo
2461b4eb46 fix shadowing and run a query after the fsync query to try to catch a problem with the WAL 2025-06-29 12:40:53 -03:00
pedrocarlo
684a23020d add cli options to disable fsync property 2025-06-29 12:40:53 -03:00
pedrocarlo
0288f4aac6 introduce fsync interaction + property 2025-06-29 12:40:52 -03:00
pedrocarlo
f806d97d0f keep track when fsync is called 2025-06-29 12:40:23 -03:00
Pekka Enberg
725c3e4ddc Rename limbo_sqlite3_parser crate to turso_sqlite3_parser 2025-06-29 12:34:46 +03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
pedrocarlo
9aa733f80c sleep inside Io completion 2025-06-26 22:17:28 -03:00
pedrocarlo
e2aafacbb4 add cli option to adjust latency probability 2025-06-26 22:17:27 -03:00
pedrocarlo
c8937976e5 generate_latency for each io operation on the file 2025-06-26 22:17:27 -03:00
pedrocarlo
56547f7127 change refcell values to cell 2025-06-26 22:17:27 -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
Jussi Saurio
9aae1ff00a sim: add Fault::ReopenDatabase
Add fault type that reopens the DB and reconnects the connections.
It purposefully does not call conn.close(), as the default behavior
of that method is to checkpoint the database.

This easily exposes multiple manifestations of DB/WAL corruption caused by
this issue: https://github.com/tursodatabase/limbo/issues/1725

in fact, in my testing, every run fails when this fault is enabled. Hence I've
added the --disable-reopen-database flag if you want to try to find some other
bugs.
2025-06-24 14:41:50 -03:00
Pekka Enberg
b1cd7229c7 Merge 'sim: when loading bug, dont panic if there are no runs' from Jussi Saurio
Closes #1820
2025-06-24 16:07:52 +03:00
Jussi Saurio
73db450b8b sim: when loading bug, dont panic if there are no runs 2025-06-24 15:46:15 +03:00
Jussi Saurio
cff96964df Fix singlequote escaping and unescaping 2025-06-24 14:58:25 +03:00
Nils Koch
2827b86917
chore: fix clippy warnings 2025-06-23 19:52:13 +01:00
pedrocarlo
c9b11dd173 simulator integrity check per query 2025-06-22 21:47:17 -03:00
Pekka Enberg
90c1e3fc06 Switch Connection to use Arc instead of Rc
Connection needs to be Arc so that bindings can wrap it with `Mutex` for
multi-threading.
2025-06-16 10:43:19 +03:00
pedrocarlo
6dfd4700e9 simulator: disable all ansi encodings for debug print log file 2025-06-14 19:34:40 -03:00
Jussi Saurio
f7fa56ecfd Change integrity check failure to say 'simulation failed:'
Some checks failed
Run long fuzz tests on Btree / run-long-tests (push) Has been cancelled
Run long fuzz tests on Btree / simple-stress-test (push) Has been cancelled
our AWS nightly sim looks for a line 'simulation failed:' in the process
output to capture context for the github issues it creates.

if the sim passes otherwise but integrity check fails, then this log line
must also be present there, otherwise the aws sim will panic due to not finding
a suitable line.
2025-06-13 11:26:04 +03:00
pedrocarlo
83d72db901 better error messages + cleaner printing of file stats + tracing
instrumentation in `execute_interaction`
2025-06-11 11:32:45 -03:00
pedrocarlo
e19fa9f951 add additional cli options to disable other properties 2025-06-11 11:32:45 -03:00
pedrocarlo
edc1c6fbc6 force predicate in SelectSelectOptimizer to evaluate to a boolean value 2025-06-11 11:32:45 -03:00
pedrocarlo
b2fd5b9cd1 change CompoundPredicate to generate a true_clause for a single row and not for column_values + tests 2025-06-11 11:32:45 -03:00
pedrocarlo
39b57552fd unary tests 2025-06-11 11:32:45 -03:00
pedrocarlo
9f601ccb18 add cli option to disable select optimizer 2025-06-11 11:32:45 -03:00
pedrocarlo
c82f4fa0bb adjust creation of columns to avoid name collision 2025-06-11 11:32:18 -03:00
pedrocarlo
1410aaa0be mostly fix binary predicate generation 2025-06-11 11:32:18 -03:00
pedrocarlo
b60037255b small fix to binary true predicate + fuzz test for true_binary_predicate. More tests to come 2025-06-11 11:32:18 -03:00
pedrocarlo
3068c3398e add more operators execution for binary 2025-06-11 11:32:18 -03:00
pedrocarlo
3e1a4bed8b namespace exec_like to Value + complete the test logic for Unary Operators 2025-06-11 11:32:18 -03:00
pedrocarlo
6b58c4a33f migrate to using limbo_core::Value inside Simulator 2025-06-11 11:32:18 -03:00
pedrocarlo
2424b1b1c9 add unary to expr_to_value 2025-06-11 11:32:18 -03:00
pedrocarlo
dc901a019c implement true_unary + false_unary 2025-06-11 11:32:18 -03:00
pedrocarlo
176ec3b0ea adjustments to binary functions + backtrack return Option<T> + start of unary Predicate 2025-06-11 11:32:18 -03:00
pedrocarlo
c12fc23516 extract logic for binary generation outside of predicate.rs 2025-06-11 11:32:18 -03:00
pedrocarlo
7385ac96ec clippy 2025-06-11 11:32:18 -03:00
pedrocarlo
5a1bacc760 adjust generation for ast::Expr 2025-06-11 11:32:17 -03:00
pedrocarlo
62e7b1f64c fix generation for string literal in a different place + simplify test assertion 2025-06-11 11:32:17 -03:00