Jussi Saurio
6c17fa2a5e
fix/sim: prevent sim from trying to create an existing table or index
...
We recently merged a change that panics the sim on parse errors, because
not doing so has masked many scenarios where the sim unintentionally
creates incorrect sql and we just ignore it.
We already have Property::DoubleCreateFailure to assert that the same table
cannot be created twice, so this should not hide any bugs.
2025-08-17 18:13:05 +03:00
pedrocarlo
2bc6edc3d4
introduce TableContext for the simulator to properly generate predicates for Joins
2025-08-15 23:44:00 +03:00
Jussi Saurio
1a11648974
sim: add Property::ReadYourUpdatesBack
2025-08-14 19:04:27 +03:00
meteorgan
b5a18d7dc9
fix get_column_name() when column name doesn't exist
2025-07-25 23:49:31 +08:00
bit-aloo
9a54ef214e
parser: Distinguish quoted identifiers and unify Id into Name enum
...
This commit replaces the `Name(pub String)` struct with a `Name` enum that
explicitly models how the name appeared in the source either as an
unquoted identifier (`Ident`) or a quoted string (`Quoted`).
In the process, the separate `Id` wrapper type has been coalesced into the
`Name` enum, simplifying the AST and reducing duplication in identifier
handling logic.
While this increases the size of some AST nodes (notably `yyStackEntry`),
it improves correctness and makes source structure more explicit for
later phases.
2025-07-24 14:40:19 +05:30
Jussi Saurio
d67a9f03fd
sim: add order by to some queries
2025-07-18 10:47:36 +03:00
Levy A.
89911ee8d1
remove to_sql_string from simulator
2025-07-16 12:34:10 -03:00
Levy A.
6fe2505425
add more ToTokens impls
2025-07-16 12:16:31 -03:00
alpaylan
9347e43dfc
clippy + fmt
2025-07-15 09:57:55 -04:00
alpaylan
6b96789b6d
add random_expr for SELECT <expr>;
2025-07-14 18:48:02 -04:00
alpaylan
731e6e32e8
updates to the generator distribution
2025-07-14 01:27:01 -04:00
alpaylan
d99793ca2f
generate parenthesizes expressions by default
2025-07-11 11:08:35 -04:00
alpaylan
3a967f9127
remove rusqlite integrity check, sync generation with --experimental-indexes, move FaultyQuery to disabled by default
2025-07-11 03:35:02 -04:00
alpaylan
b98542d112
cargo fmt and cargo clippy fixes
2025-07-11 02:12:56 -04:00
alpaylan
65fe60ba57
fix the merge conflicts
2025-07-11 02:04:14 -04:00
alpaylan
8f46bbc77e
Merge branch 'main' of https://github.com/tursodatabase/limbo
2025-07-11 01:33:50 -04:00
alpaylan
489602b095
updates to the oracle implementations for differential and doublecheck, add integrity check to the end of the simulation, run cargo clippy --fix
2025-07-11 01:22:40 -04:00
alpaylan
44a2fa60a3
add union all cardinality preservation, start generating INSERT INTO t SELECT... queries, add integrity checks to the end of run_simulation
2025-07-09 00:14:13 -04:00
alpaylan
f5d4429b04
reproduce very specific bug for https://github.com/tursodatabase/turso/issues/1991 with seed 13622105005141748081
2025-07-07 13:11:09 -04:00
pedrocarlo
d21a629cd9
rollback simulator table when we encounter a Rollback query
2025-07-07 13:37:51 -03:00
pedrocarlo
7c8737e292
do not shadow + continue the assertion on injected fault error
2025-07-07 11:53:45 -03:00
alpaylan
ea9c67a950
generate joins and unions
2025-07-07 02:54:48 -04:00
alpaylan
0bce68b38d
wip: add joins to the select
2025-07-06 14:46:38 -04:00
Pere Diaz Bou
897f13c173
add interactive transaction to property insert-values-select
2025-07-04 15:50:46 +02:00
pedrocarlo
ac34928d53
fix delete shadowing + build result rows from fsync query
2025-06-29 12:44:13 -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
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
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
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
7385ac96ec
clippy
2025-06-11 11:32:18 -03:00
pedrocarlo
62e7b1f64c
fix generation for string literal in a different place + simplify test assertion
2025-06-11 11:32:17 -03:00
pedrocarlo
470093ca03
fix generation for string literal
2025-06-11 11:32:17 -03:00
pedrocarlo
fac4b4e6fb
fix generation and expr evaluation
2025-06-11 11:32:17 -03:00
pedrocarlo
9f2608bded
remove previous predicate struct and rewrite generation with the new the struct
2025-06-11 11:32:17 -03:00
pedrocarlo
3e369b9dde
drop in replacement for predicate that uses ast::Expr under the hood
2025-06-11 11:32:17 -03:00
pedrocarlo
f535ff1398
add optional serde implementations for parser ast
2025-06-11 11:32:17 -03:00
pedrocarlo
63cf648e2e
filter for the tables that the failing query depended on + second pass after query clear
2025-06-11 02:52:26 -03:00
Jussi Saurio
5680326881
sim: add CREATE INDEX to interactions
2025-06-04 09:21:59 +03:00
Pere Diaz Bou
8ec7e616b4
simulator: switch to tracing, run io.run_once and add update queries
...
* Without tracing crate we cannot log anything that happens in
limbo_core
* IO never ran in step loop inside simulator.
* Added update queries (which currently loop forever for some reason I'm
debugging).
2025-05-30 10:57:13 +02:00
alpaylan
747b6d15e3
add NoREC optimizer testing property
2025-02-10 15:42:49 -05:00
alpaylan
47420db16f
- implement DROP TABLE support, toggled off from generation for now
...
- clean up the query generation/printing by separating it into different files and removing duplications
2025-02-09 09:28:33 -05:00