Commit Graph

3874 Commits

Author SHA1 Message Date
Pere Diaz Bou
62d0febdb6 panic on corruption 2025-04-10 16:01:24 +02:00
Pere Diaz Bou
b35d805a81 tracing lock stress 2025-04-10 16:01:24 +02:00
Pere Diaz Bou
8e93471d00 fix cell index selection while balancing
Cell index doesn't move in `move_to` unless we don't need to check next
cell. On the other hand, with rightmost pointer, we advance cell index
by 1 even though where we are moving to was to that page
2025-04-10 16:01:24 +02:00
Pere Diaz Bou
4755acb571 init tracing in stress tool 2025-04-10 16:01:24 +02:00
Pere Diaz Bou
0c4e56ecf9 Merge 'Add support to load log file with stress test' from Pere Diaz Bou
run with: `RUST_BACKTRACE=1 cargo run -p limbo_stress -- -t 1 -l`
and then if you want to repeat same plan: `RUST_BACKTRACE=1 cargo run -p
limbo_stress -- -t 1 -L`

Closes #1296
2025-04-10 16:01:11 +02:00
Pere Diaz Bou
cdcbcafbdd clipppy 2025-04-10 13:46:40 +02:00
Pere Diaz Bou
f795a9e331 Add support to load log file with stress test 2025-04-10 13:41:10 +02:00
Jussi Saurio
579d04f521 Merge 'io/linux: make syscallio the default (io_uring is really slow)' from Jussi Saurio
context: https://github.com/tursodatabase/limbo/issues/1275

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1295
2025-04-10 13:55:06 +03:00
Jussi Saurio
60a13c129f io/linux: make syscallio the default (io_uring is really slow) 2025-04-10 13:32:26 +03:00
Pekka Enberg
6ffa9cf56a Merge 'Stress improvements' from Pekka Enberg
Closes #1292
2025-04-10 12:18:53 +03:00
Pekka Enberg
277efeb5ee Merge 'VDBE code cleanups' from Pekka Enberg
Closes #1291
2025-04-10 12:10:22 +03:00
Pekka Enberg
3fd378cf9f Fix Antithesis Dockerfile to include JavaScript bindings 2025-04-10 12:08:31 +03:00
Pekka Enberg
441cd637b5 stress: Make database file configurable 2025-04-10 11:59:25 +03:00
Pekka Enberg
c4d983bcfe stress: Log SQL statements to a file 2025-04-10 11:59:25 +03:00
Pekka Enberg
39cee1b146 stress: Increase default number of iterations 2025-04-10 11:59:25 +03:00
Pekka Enberg
f50662205e stress: Fix schema creation 2025-04-10 11:59:25 +03:00
Pekka Enberg
207563208f stress: Add support for INSERT, DELETE, and UPDATE 2025-04-10 11:59:25 +03:00
Pekka Enberg
6aaa105321 stress: Add schema generation support 2025-04-10 11:43:32 +03:00
Pekka Enberg
31f0d174d7 core/vdbe: Move exec_*() funtions to execute.rs 2025-04-10 09:42:03 +03:00
Pekka Enberg
3fd51cdf06 core/vdbe: Move Insn implementation close to struct definition 2025-04-10 09:28:43 +03:00
Pekka Enberg
5906d7971a core/vdbe: Clean up imports 2025-04-10 09:25:15 +03:00
Pekka Enberg
b6718471ce Merge 'Fix EXPLAIN to be case insensitive' from Pedro Muniz
Closes #1286

Closes #1287
2025-04-09 20:23:09 +03:00
pedrocarlo
94217319a2 Fix Explain to be case insensitive 2025-04-09 14:21:18 -03:00
Pekka Enberg
e21e2b5449 Merge 'core: Fix syscall VFS on Linux' from Pekka Enberg
Fix the syscall VFS on Linux not to use `PlatformIO`, which is just an
alias for `io_uring`.

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

Closes #1285
2025-04-09 19:38:45 +03:00
Pekka Enberg
2d009083ba core: Fix syscall VFS on Linux
Fix the syscall VFS on Linux not to use `PlatformIO`, which is just an
alias for `io_uring`.
2025-04-09 19:27:58 +03:00
Pekka Enberg
a6e32c95d7 Merge 'Support UPDATE for virtual tables' from Preston Thorpe
closes #1144

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

Closes #1169
2025-04-09 18:21:10 +03:00
PThorpe92
f223e66c82 Remove unused mut and fix merge conflict issues 2025-04-09 11:15:04 -04:00
PThorpe92
13ae19c78c Remove unnecessary clones from mc cursors 2025-04-09 11:15:04 -04:00
PThorpe92
62d1447cd6 Adapt query plan to handle vatbs for updates 2025-04-09 11:15:02 -04:00
PThorpe92
0ffecb3021 Add comments to document update on vtabs 2025-04-09 11:06:41 -04:00
PThorpe92
7993857020 Add py tests for vtab update behavior 2025-04-09 11:06:41 -04:00
PThorpe92
b685086cad Support UPDATE for virtual tables 2025-04-09 11:06:41 -04:00
PThorpe92
2d7a27fbfa Prevent panic in extension by out of bounds cursor idx 2025-04-09 11:06:40 -04:00
Pekka Enberg
0336783831 Merge 'Add .timer command to print SQL execution statistics' from Pere Diaz Bou
```
Limbo v0.0.19-pre.4
Enter ".help" for usage hints.
limbo> .timer on
limbo> select count(1) from users;
┌───────────┐
│ count (1) │
├───────────┤
│     10000 │
└───────────┘
Command stats:
----------------------------
total: 35 ms (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=16 us, total=33 us
I/O: avg=123 ns, total=3 us
limbo> select 1;
┌───┐
│ 1 │
├───┤
│ 1 │
└───┘
Command stats:
----------------------------
total: 282 us (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=2 us, total=4 us
I/O: No samples available
```

Closes #1281
2025-04-09 17:58:48 +03:00
Pere Diaz Bou
2316d7ebf1 add .timer command with fine grained statistics about limbo
```
Limbo v0.0.19-pre.4
Enter ".help" for usage hints.
limbo> .timer on
limbo> select count(1) from users;
┌───────────┐
│ count (1) │
├───────────┤
│     10000 │
└───────────┘
Command stats:
----------------------------
total: 35 ms (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=16 us, total=33 us
I/O: avg=123 ns, total=3 us
limbo> select 1;
┌───┐
│ 1 │
├───┤
│ 1 │
└───┘
Command stats:
----------------------------
total: 282 us (this includes parsing/coloring of cli app)

query execution stats:
----------------------------
Execution: avg=2 us, total=4 us
I/O: No samples available
```
2025-04-09 16:31:08 +02:00
Pekka Enberg
ddc5e49451 Merge 'Index insert fixes' from Pere Diaz Bou
Closes #1279
2025-04-09 17:21:53 +03:00
Pekka Enberg
5de2d91d04 Update COMPAT.md 2025-04-09 17:07:24 +03:00
Pekka Enberg
dbb346ba28 Update COMPAT.md 2025-04-09 17:03:53 +03:00
Pekka Enberg
3b98675aa0 Update COMPAT.md 2025-04-09 17:02:25 +03:00
Pere Diaz Bou
6a02730c1a rebase fixes 2025-04-09 15:56:04 +02:00
Pekka Enberg
a4d9f70ef8 Merge 'Strict table support' from Ihor Andrianov
Closes #884
Support for
```CREATE TABLE test(id INTEGER) STRICT;```

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

Closes #1268
2025-04-09 16:45:56 +03:00
Pekka Enberg
3025b71406 Merge 'Memory tests to track large blob insertions' from Pedro Muniz
My PR #972 always keeps breaking when there are changes in how Btree
works lol. I'm extracting the memory tests I created there here, so we
can track problems earlier.

Closes #1228
2025-04-09 16:45:06 +03:00
Pere Diaz Bou
7b384f8e5c set iteration_state for insert 2025-04-09 15:29:06 +02:00
Pekka Enberg
e67f56bb3d Merge 'Setup tracing to allow output during test runs' from Preston Thorpe
## The problem:
Sometimes you want to run the tests _and_ look at logs, and previously
that wasn't possible because all the tests relied on stdout/stderr.
## The solution:
Setup `tracing-appender` to automatically log to a designated
`testing/test.log` when `RUST_LOG` is set.
This PR also starts a `testing.md` file describing testing in limbo. My
hope is that people who know stuff about DST and the fuzzing setup will
fill in the TODOs :)

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

Closes #1277
2025-04-09 16:16:26 +03:00
Pere Diaz Bou
6b7575bf3f fix tree traversal assumptions on traversal 2025-04-09 15:04:45 +02:00
Pere Diaz Bou
f2d9e1e8f5 fix divider cell in index 2025-04-09 15:04:45 +02:00
Pere Diaz Bou
12899034c9 make insert idx re-entrant 2025-04-09 15:04:45 +02:00
Pere Diaz Bou
d9453f6e06 fix cell_get_raw_region length calculation 2025-04-09 15:04:45 +02:00
Pere Diaz Bou
0f59fc7e36 Merge 'Decrease page count on balancing fixes' from Pere Diaz Bou
* Comment how decrease of pages happen while balancing
* Free pages no longer used after balancing finished.

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

Closes #1278
2025-04-09 15:04:25 +02:00
Pere Diaz Bou
f1df09ffd9 free no longer used pages after balance 2025-04-09 11:12:39 +02:00