Hi there,
I wasn't able to run the Turso CLI locally following the manual in the
docs (with both the release version and Homebrew). I found out that the
right command is `tursodb` rather than just turso as specified in the
cli/Cargo.toml.
This MR updates the docs and also mention the instruction to install it
with Homebrew.
Demo:
<img width="629" height="129" alt="image" src="https://github.com/user-
attachments/assets/3c684328-dab6-436a-bae6-4b6199f5b0b5" />
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes#2514
This PR rewrites the `LimboRwLock`, which previously used 3 separate
`AtomicU32` values to store the lock state, in favor of a single,
packed, cache friendly `AtomicU64`.
The previous impl has some complexity and rather hairy edge cases/issues
because we are not updating the lock state together. This PR also
adjusts it to use `Acquire`/`Release` for `load`/`store` operations, and
tries to improve the API of using the locks.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2518
This PR introduces a BufferPool which allocates all (usually) of the
memory we will need up front as two large arenas (one for WAL frames and
one for DB pages) and hands our pages from those two arena allocations.
(each will be 3 MB by default, because 8MB is typically the RL_MEMLOCK
limit so without `setcap cap_ipc_lock` changed, it will not be able to
properly register the arenas with io_uring).
Any additional memory needed will fall back to the previous style buffer
pool, with a simple thread local cache, which should be slightly faster
for most cases.
Closes#2419
We should be allocator-agnostic. It is pretty limiting for us to force a
user to use a particular allocator. This is specially restricting for
`no_std` in the future.
Reviewed-by: bit-aloo (@Shourya742)
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes#2481
This fix ensures that `WHERE` conditions are emitted after the `LEFT
JOIN` match flag is set, so rows from the right table are properly
filtered, even when they are `NULL` due to the outer join.
Previously, the query below would return rows where `products.price` was
`NULL`:
```sql
SELECT users.id, price
FROM users
LEFT JOIN products ON users.id = products.id
WHERE products.price IS NOT NULL;
```
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2501
Built on top of #2502
```rust
/// Cached value of the usable space of a BTree page, since it is very expensive to call in a hot loop via pager.usable_space().
/// This is OK to cache because both 'PRAGMA page_size' and '.filectrl reserve_bytes' only have an effect on:
/// 1. an uninitialized database,
/// 2. an initialized database when the command is immediately followed by VACUUM.
usable_space_cached: usize,
```
Reviewed-by: Nikita Sivukhin (@sivukhin)
Closes#2503