Commit Graph

5550 Commits

Author SHA1 Message Date
Ihor Andrianov
650c85ccd7 save binary search state for reentrant execution 2025-07-03 15:08:16 +03:00
Ihor Andrianov
40c14f705f fix equal handling 2025-06-28 19:51:23 +03:00
Ihor Andrianov
8942bb7474 make find_cell use binary search 2025-06-28 18:53:44 +03:00
Pekka Enberg
a60da8186f Merge 'Remove dependency on test extension pkg' from Preston Thorpe
To prevent having to publish the crate on crates.io

Closes #1865
2025-06-27 18:22:45 +03:00
PThorpe92
b655ac8267 Remove tests that dynamically load generate_series extension 2025-06-27 09:50:15 -04:00
PThorpe92
708aaf95ee Add generate_series to default built-in extensions 2025-06-27 09:48:17 -04:00
PThorpe92
0e26cf77cb Remove dependency on testing extension crate 2025-06-27 09:41:18 -04:00
Pekka Enberg
5791ab9dff Merge 'Cache reserved_space and page_size values at Pager init to prevent doing redundant IO' from Krishna Vishal
### Problem
Profiling revealed that `usable_space()` calls were consuming 60% of
total execution time for simple SELECT queries, making Limbo
approximately `6x` slower than SQLite for SELECT operations.
The bottleneck was caused by `usable_space()` performing expensive I/O
operations on every call to read `page_size` and `reserved_space` from
the database header, despite `page_size` values being effectively
immutable after database initialization. Only `reserved_space` is
allowed to increase in SQLite.
Evidence: https://share.firefox.dev/44tCUIy
### Solution
Implemented OnceCell-based caching for both page_size and reserved_space
values in the Pager struct:
`page_size: OnceCell<u16>` - Page size is immutable after database
initialization per SQLite specification
`reserved_space: OnceCell<u8>` - Reserved space rarely changes and only
grows, safe to cache
### Performance Impact
Benchmark results: Simple SELECT query time reduced from ~2.89ms to
~1.29ms (~55% improvement)

Closes #1852
2025-06-27 16:40:14 +03:00
Pekka Enberg
9c20008d94 Update README.md 2025-06-27 16:33:22 +03:00
Pekka Enberg
27736d3785 Update README.md 2025-06-27 16:04:38 +03:00
Pekka Enberg
d938ac47c3 Turso 0.1.0-pre.2 2025-06-27 16:02:09 +03:00
Pekka Enberg
280587eb92 github: Fix JavaScript publish pipeline 2025-06-27 15:41:36 +03:00
Pekka Enberg
f9685515e4 Merge 'Fix executing multiple statements' from Pere Diaz Bou
Fixes #1861
Fixes #1380

Closes #1863
2025-06-27 15:37:03 +03:00
Pere Diaz Bou
22cb95bc5d execute run on multiple parsed statements 2025-06-27 14:02:47 +02:00
Pekka Enberg
09ba89e2ba core/translate: Replace todo with bail_parse_error
No point in crashing the whole app if someone attempts to change page
size.
2025-06-27 13:42:49 +03:00
Pekka Enberg
a87f294f24 cli: Switch to syntect development version
Fixes #1504
2025-06-27 13:21:10 +03:00
Pekka Enberg
c12b291f9a Merge 'Fix evaluation of ISNULL/NOTNULL in OR expressions' from Piotr Rżysko
Previously, the `jump_if_condition_is_true` flag was not respected. As a
result, for expressions like <`ISNULL`/`NOTNULL`> `OR` <rhs>, the <rhs>
expression was evaluated even when the left-hand side was true, and its
value was incorrectly used as the final result.

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

Closes #1846
2025-06-27 13:15:21 +03:00
Pekka Enberg
09795ca512 Turso 0.1.0-pre.1 2025-06-27 12:56:22 +03:00
Pekka Enberg
a539c557d6 scripts/update-version.py: s/Limbo/Turso/ 2025-06-27 12:56:06 +03:00
Pekka Enberg
da7152020b Merge 'cli: Rename CLI to Turso' from Pekka Enberg
Closes #1859
2025-06-27 12:55:50 +03:00
Pekka Enberg
c414db2196 Merge 'Fix database header contents on initialization' from Pere Diaz Bou
After moving page1 write to be async I moved the contents update to
wrong place. This should fix it.
Fixes #1842
Fixes #1837

Closes #1860
2025-06-27 12:47:31 +03:00
Pere Diaz Bou
8e0f8041ed properly set database header contents on initialization
After moving page1 write to be async I moved the contents update to
wrong place. This should fix it.
2025-06-27 11:44:11 +02:00
Pekka Enberg
45c1a72d0a cli: Rename CLI to Turso 2025-06-27 12:37:42 +03:00
Pekka Enberg
81609845ba Merge 'bindings/javascript: Rename package to @tursodatabase/turso' from Pekka Enberg
Closes #1857
2025-06-27 12:30:24 +03:00
Pekka Enberg
568da9bff7 bindings/javascript: Rename package to @tursodatabase/turso 2025-06-27 12:14:16 +03:00
Pekka Enberg
947f11676d Merge 'bindings/python: Rename package to pyturso' from Pekka Enberg
Closes #1854
2025-06-27 11:59:20 +03:00
Pekka Enberg
5653f96701 cargo fmt 2025-06-27 11:46:14 +03:00
Pekka Enberg
aaecca0ec9 cli: Add disclaimer that software is ALPHA 2025-06-27 11:28:32 +03:00
Pekka Enberg
a5b539f1bf bindings/python: Rename package to pyturso 2025-06-27 11:27:08 +03:00
Krishna Vishal
cda1ab8d76 Use OnceCell instead of OnceLock. 2025-06-27 13:32:03 +05:30
Pekka Enberg
e23835ed8e github: Make labels lower case consistently
We're using both CamelCase and lower case for labels which is driving me crazy.
2025-06-27 10:44:23 +03:00
Krishna Vishal
af2ab87810 Cache reserved_space and page_size values at Pager init.
We use `OnceLock` for this. TODO: Invalidate reserved_space when
we make functionality the to change it.
2025-06-27 12:51:11 +05:30
Piotr Rzysko
116df2ec86 Fix evaluation of ISNULL/NOTNULL in OR expressions
Previously, the `jump_if_condition_is_true` flag was not respected. As a
result, for expressions like <`ISNULL`/`NOTNULL`> `OR` <rhs>, the <rhs>
expression was evaluated even when the left-hand side was true, and its
value was incorrectly used as the final result.
2025-06-27 08:21:40 +02:00
Pekka Enberg
e1c8c676ca Merge 'Support insersect operator for compound select' from meteorgan
Closes: #1575

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

Closes #1793
2025-06-27 09:13:16 +03:00
Pekka Enberg
8c03a7c1c9 Merge 'Simulator: add latency to File IO' from Pedro Muniz
This PR introduces the ability to introduce latency (e.g thread::sleep)
in every File IO operation. There is a new cli option that configures
the probability of introducing latency. Currently, this probability
defaults to 0, as this change has already detected an infinite loop in
`checkpoint`. To see this bug in action run the following command:
`cargo run -p limbo_sim -- --seed 3961479079923545111 --latency_prob 5`
<img width="918" alt="Pasted Graphic 1" src="https://github.com/user-
attachments/assets/dbf38760-b478-45c2-ac8b-a0ddcf98fd23" />
EDIT: Investigating the bug further, I see that it is returning to the
simulator after the disconnect checkpoint, but I have not yet seen this
test end. Maybe it is just taking too long? Something to look further at

Closes #1770
2025-06-27 09:02:08 +03:00
meteorgan
0ed94f13f5 resolve conflicts 2025-06-27 11:50:19 +08:00
meteorgan
51764d882e fix comments 2025-06-27 11:50:19 +08:00
meteorgan
2c4847210f ajust code to accommodate index_experimental feature 2025-06-27 11:50:19 +08:00
meteorgan
c060905d00 add INTERSECT to compound_select_fuzz 2025-06-27 11:50:19 +08:00
meteorgan
41def8895f make intersect in compound work with insert 2025-06-27 11:50:19 +08:00
meteorgan
1fcc2ddd90 support limit 2025-06-27 11:50:19 +08:00
meteorgan
d4789d0a05 add tests 2025-06-27 11:50:19 +08:00
meteorgan
cd36fc26fd support intersect operation for compound select 2025-06-27 11:50:19 +08:00
pedrocarlo
1dc28e32f0 fix io_uring completion + clippy 2025-06-26 22:17:28 -03:00
pedrocarlo
9aa733f80c sleep inside Io completion 2025-06-26 22:17:28 -03:00
pedrocarlo
bac5e4b563 refactor File and Database Storage to remove Arc<Connection> and return Arc<Connection> for caller to wait for completion 2025-06-26 22:17:28 -03:00
pedrocarlo
64d9193e7b refactor Completion to have a type field and lift common is_complete property 2025-06-26 22:17:27 -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