Commit graph

62 commits

Author SHA1 Message Date
Krishna Vishal
7db6e2dfea Decrease db rows and increase random values 2025-06-11 00:33:48 +05:30
krishvishal
5837f7329f clean up 2025-06-11 00:33:47 +05:30
krishvishal
e01f4d55f7 Reduce fuzz iters 2025-06-11 00:33:47 +05:30
krishvishal
9eb2235135 A simple fuzz test for fuzzing seeking ops 2025-06-11 00:33:05 +05:30
Jussi Saurio
d5623e752b make compound_select_fuzz() test more likely to generate duplicate rows 2025-05-25 21:27:45 +03:00
Jussi Saurio
d893a55c55 UNION 2025-05-25 21:23:04 +03:00
Jussi Saurio
8ed5334ca7 tests/fuzz: add compound_select_fuzz() 2025-05-24 13:12:41 +03:00
Jussi Saurio
cbb3efab82 Fuzz: modify rowid_seek_fuzz so that it catches this regression in the future 2025-05-23 14:28:25 +03:00
pedrocarlo
f28ce2b757 add collations to btree cursor 2025-05-19 15:22:55 -03:00
pedrocarlo
3526a206e4 support Unique properly by creating a vec of auto indices 2025-05-14 11:34:39 -03:00
pedrocarlo
2b3285d669 test opening in read only mode 2025-05-02 16:31:11 -03:00
Jussi Saurio
48071b7ad7 tests/fuzz/compound_index_seek: order select cols by definition order 2025-04-23 17:34:32 +03:00
Jussi Saurio
517390a4ea tests/fuzz/compound_index_seek: show which table had failed query 2025-04-23 16:57:43 +03:00
Jussi Saurio
8477ff0d3d tests/fuzz: amend compound index key fuzz to include nonindexed columns some of the time 2025-04-18 15:13:13 +03:00
Jussi Saurio
95bc644244 tests/fuzz: make compound key fuzz test a bit stricter with ordering 2025-04-16 14:10:25 +03:00
Jussi Saurio
8757510606 test/fuzz: revamp compound key seek fuzz test to include desc indexes and be more efficient 2025-04-16 13:58:12 +03:00
Jussi Saurio
1141cbaf3b logical_expr_fuzz: add primary keys to test table to detect issues w index usage 2025-04-12 11:12:48 +03:00
Jussi Saurio
3d1b4c5292 test/fuzz: modify compound index scan fuzz to utilize both pk columns in where clause 2025-04-10 15:06:18 +03:00
Jussi Saurio
d9bae633c0 Add rowid_seek_fuzz() test 2025-04-09 10:14:29 +03:00
Jussi Saurio
431ef2fa6a Add TCL/differential fuzz tests for verifying index scan behavior 2025-04-09 10:14:29 +03:00
Pere Diaz Bou
ee55116ca6 return row as reference to registers 2025-03-29 22:04:08 +01:00
Pere Diaz Bou
bf37fd3314 wip 2025-03-29 22:02:49 +01:00
Pere Diaz Bou
d01423df83 fix clippy 2025-03-27 17:54:32 +01:00
Pekka Enberg
19a348c91a Merge 'Print seed for failed fuzz tests' from Pedro Muniz
Reviewed-by: Preston Thorpe (@PThorpe92)

Closes #1047
2025-03-04 10:25:47 +02:00
Pekka Enberg
936ae307b7 core: Kill value type
We currently have two value types, `Value` and `OwnedValue`. The
original thinking was that `Value` is external type and `OwnedValue` is
internal type. However, this just results in unnecessary transformation
between the types as data crosses the Limbo library boundary.

Let's just follow SQLite here and consolidate on a single value type
(where `sqlite3_value` is just an alias for the internal `Mem` type).
The way this will eventually work is that we can have bunch of
pre-allocated `OwnedValue` objects in `ProgramState` and basically
return a reference to them all the way to the application itself, which
extracts the actual value.
2025-02-26 10:57:45 +02:00
pedrocarlo
521d4d85ca adding seed to output of failed tests 2025-02-19 14:23:09 -03:00
Jussi Saurio
55ff1d2061 remove comment 2025-02-17 10:59:04 +02:00
Jussi Saurio
7eaa3f4da0 Extract variable 2025-02-17 10:58:38 +02:00
Jussi Saurio
6940ca84bd Add more column <op> column binary op possibilities to fuzzer 2025-02-17 10:57:58 +02:00
Jussi Saurio
e07007896f tests/fuzz: use mostly the same expression options in select and predicate position 2025-02-17 07:43:09 +02:00
Nikita Sivukhin
0679357fda insert numbers from different categories in order to cover cases of different serial type usage 2025-02-16 12:33:26 +04:00
Nikita Sivukhin
77d4bb6e0e fix after merge 2025-02-15 23:00:30 +04:00
Nikita Sivukhin
db7544fe7a
Merge branch 'tursodatabase:main' into fix-and-predicate 2025-02-15 22:57:56 +04:00
Nikita Sivukhin
becc58565d run IO in fuzz tests 2025-02-15 22:48:01 +04:00
Jussi Saurio
01f51a4c20 Merge 'Fix math binary' from Nikita Sivukhin
Fix codegen for binary functions and add fuzz test for math functions
(we need to compile `rusqlite` with `-DSQLITE_ENABLE_MATH_FUNCTIONS` in
order to bundle sqlite with math functions compiled)

Reviewed-by: Jussi Saurio (@jussisaurio)

Closes #1015
2025-02-15 18:17:08 +02:00
Nikita Sivukhin
3233d60bea trying to debug hungs in CI 2025-02-15 18:03:29 +04:00
Nikita Sivukhin
e7c501a3be add simple fuzz test with table data 2025-02-15 16:27:11 +04:00
Nikita Sivukhin
610d41ae9e add fuzz test for math functions 2025-02-15 14:33:37 +04:00
Nikita Sivukhin
aa3cafba51 add fuzz test for replace and substr 2025-02-15 13:21:40 +04:00
Pekka Enberg
604ca4085d Merge 'Make record values private' from Tiago
This is an attempt to move towards #881. I am not sure this is the
direction you want to take. In any case, I thought I would take a crack
at converting `values` from `Record` to private and see how bad it would
be.
In the end, as you can see, it is not so bad. I think performance-wise
it shouldn't be a bad hit with Rust's zero-cost abstraction. Also,
during the process I noticed a couple improvements that could be made
here and there but I honestly wanted to start with something small
enough that wouldn't be too hard to review.
Anyway, let me know if this is really how you would like to proceed.

Closes #962
2025-02-10 11:23:21 +02:00
Pekka Enberg
00a546e775 Merge 'Fix string funcs' from Nikita Sivukhin
Add fuzz test for string functions and fix 2 bugs in implementation of
`LTRIM/RTRIM/TRIM` and `QUOTE`:
- `QUOTE` needs to escape internal quote(`'`) symbols
- `LTRIM`/`RTRIM`/`TRIM` needs to check if they have additional argument

Closes #958
2025-02-10 11:17:51 +02:00
Pekka Enberg
55058cade3 Merge 'Fix cast' from Nikita Sivukhin
Fix codegen for `CAST` expression and also adjust implementation of
`CAST: Real -> Int` because `SQLite` use "closest integer between the
REAL value and zero" as a CAST result.

Closes #956
2025-02-10 10:53:56 +02:00
Pekka Enberg
09b402e261 Merge 'Fix coalesce' from Nikita Sivukhin
Add `COALESCE` function in fuzz test and fix bug (found by fuzzer with
`COALESCE`) related to the resolution of labels which needs to be
resolved to next emitted instruction.
Before, code assumed that no two labels will need to be resolved to next
emitted instruction. But this assumption is wrong (at least in current
codegen logic) for example for following expression `COALESCE(0,
COALESCE(0, 0))`. Here, both `COALESCE` functions will create label and
resolve it to next emitted instruction in the end of generation. So, in
this case one of the labels will be actually "orphaned" and never be
assigned any position in the emitted code.

Closes #955
2025-02-10 10:53:44 +02:00
Pekka Enberg
31886e8f4c Merge 'Fix case and emit' from Nikita Sivukhin
(after fixing complicated b-tree bugs - I want to end my day with the
joy of fixing simple bugs)
This PR fix bug in emit (which was introduced after switch from
`HashMap` to `Vec`) and also align `CASE` codegen in case of `NULL`
result from `WHEN` clause with SQLite behaviour.

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

Closes #953
2025-02-10 10:53:31 +02:00
Tiago Ribeiro
d00b44d7cd
Update integration tests to use the new retrieval methods to access Record values. 2025-02-10 00:31:31 -07:00
Nikita Sivukhin
f22bfad695 reduce amount of iterations in fuzz test 2025-02-09 23:44:38 +04:00
Nikita Sivukhin
459a78bc64 add fuzz test for few string functions 2025-02-09 23:43:34 +04:00
Nikita Sivukhin
d2fb772936 adjust CAST fuzzing options 2025-02-09 22:47:06 +04:00
Nikita Sivukhin
e3e399f9b1 fixup fuzz 2025-02-09 22:31:13 +04:00
Nikita Sivukhin
9a3af4bd06 add CAST expression in the fuzz test 2025-02-09 22:20:13 +04:00