Commit Graph

8336 Commits

Author SHA1 Message Date
TcMits
bc8b848aba docs 2025-09-02 18:43:12 +07:00
TcMits
06e14c8ace merge main 2025-09-02 18:17:37 +07:00
TcMits
d298480e4a Merge branch 'main' into perf-3 2025-09-02 18:13:58 +07:00
Pekka Enberg
3ec6f37555 scripts: Add turso_sqlite3_parser back to publish-crates.sh
Turns out turso_parser depends on it.
2025-09-02 12:52:40 +03:00
Pekka Enberg
91a51c170e Fix up turso_parser version in Cargo.toml 2025-09-02 12:47:49 +03:00
Pekka Enberg
6c7936a016 Turso 0.1.5-pre.2 2025-09-02 12:45:41 +03:00
Pekka Enberg
adaf0bec6c scripts: Fix publish-crates.sh to publish new parser crate 2025-09-02 12:45:16 +03:00
Pekka Enberg
483cd92dab Drop removed Go bindings from Antithesis Dockerfile 2025-09-02 09:48:53 +03:00
Pekka Enberg
15d45e3f68 Merge 'Refactor encryption to manage authentication tag internally' from bit-aloo
This PR updates the internal encryption framework to handle
authentication tags explicitly rather than relying on the underlying
cipher libraries to append/verify them automatically.
closes: #2850

Reviewed-by: Avinash Sajjanshetty (@avinassh)

Closes #2858
2025-09-02 09:44:22 +03:00
Pekka Enberg
7189e98455 Merge 'Unify handling of grouped and ungrouped aggregations' from Piotr Rżysko
The initial commits fix issues and plug gaps between ungrouped and
grouped aggregations.
The final commit consolidates the code that emits `AggStep` to prevent
future disparities between the two.

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #2867
2025-09-02 09:11:40 +03:00
Pekka Enberg
0868af29df Merge 'core/printf: support for more basic substitution types' from Luiz Gustavo
Some progress working on `printf` support.
(relevant issue https://github.com/tursodatabase/turso/issues/885)
Implementation of the basic substitution types cited in the `TODO`
comment on the beginning of the file (%i, %x, %X, %o, %e, %E, %c). There
are some others in the sqlite spec which I will implement in a future
PR.
I tried to pay attention to the specific behaviors from sqlite as much
as possible while testing this, but if there's something I missed please
tell me.
Also, I see this code needs to be reorganized already, I'm still
thinking on the best approach to do that without affecting the
ergonomics of new implementations, I'm still learning Rust so this is
not obvious for me right now. I'm open to suggestions about it.

Closes #2868
2025-09-02 09:10:03 +03:00
Pekka Enberg
1f6ba4f822 Merge 'Fix sim-schema command ' from Pedro Muniz
Create the directory to store the schema if it does not exists

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #2882
2025-09-02 09:08:57 +03:00
Pekka Enberg
87d3f74e6e Merge 'Evict page from cache if page is unlocked and unloaded' from Pedro Muniz
Because we can abort a read_page completion, this means a page can be in
the cache but be unloaded and unlocked. However, if we do not evict that
page from the page cache, we will return an unloaded page later which
will trigger assertions later on. This is worsened by the fact that page
cache is not per `Statement`, so you can abort a completion in one
Statement, and trigger some error in the next one if we don't evict the
page in these circumstances.
Also, to propagate IO errors we need to return the Error from
IOCompletions on step.

Closes #2785
2025-09-02 09:08:12 +03:00
Pekka Enberg
d959319b42 Merge 'Use u64 for file offsets in I/O and calculate such offsets in u64' from Preston Thorpe
Using `usize` to compute file offsets caps us at ~16GB on 32-bit
systems. For example, with 4 KiB pages we can only address up to 1048576
pages; attempting the next page overflows a 32-bit usize and can wrap
the write offset, corrupting data. Switching our I/O APIs and offset
math to u64 avoids this overflow on 32-bit targets

Closes #2791
2025-09-02 09:06:49 +03:00
Pekka Enberg
cfaba4ab10 Merge 'Implement libSQL's ALTER COLUMN extension' from Levy A.
Implement `ALTER COLUMN` as described here:
https://github.com/tursodatabase/libsql/blob/main/libsql-
sqlite3/doc/libsql_extensions.md#altering-columns
- [x] Add `ALTER COLUMN` to parser
- [x] Implement `Insn::AlterColumn`
- [x] Add tests

Closes #2814
2025-09-02 09:06:03 +03:00
Pekka Enberg
da81e43f9a Merge 'Document how to use CDC' from Pavan Nambi
Fixes #2221

Reviewed-by: Nikita Sivukhin (@sivukhin)

Closes #2871
2025-09-02 09:04:44 +03:00
Pekka Enberg
149942abe4 Merge 'Return sqlite_version() without being initialized' from Preston Thorpe
needed to support opening in Gorm

Closes #2878
2025-09-02 09:04:25 +03:00
Pekka Enberg
a21d580f80 Merge 'Upgrade Rust version in simulator build Dockerfile' from Preston Thorpe
otherwise simulator profiles will not build as it uses the new if let
syntax

Closes #2880
2025-09-02 09:04:03 +03:00
pedrocarlo
72d697e0eb fix sim-schema command by creating directory if it not exists 2025-09-01 21:05:25 -03:00
PThorpe92
be2807b61f Upgrade rust version in simulator build dockerfile 2025-09-01 14:56:05 -04:00
PThorpe92
e9b50b63fb Return sqlite_version() without being initialized 2025-09-01 13:36:41 -04:00
Preston Thorpe
f3d252d665 Merge 'Parse booleans to integer literals in expressions' from Preston Thorpe
Adds tests for edgecases for the insane cases where someone might want
to name a table `true` :)

Closes #2874
2025-09-01 13:36:29 -04:00
PThorpe92
b76f9b7733 Use eq_ignore_ascii_case in place of allocating new string in parser 2025-09-01 12:32:33 -04:00
PThorpe92
f02e02af75 Fix TCL test 2025-09-01 11:39:43 -04:00
PThorpe92
bd9d6aa168 Add edge-case tests for boolean literals 2025-09-01 11:27:43 -04:00
PThorpe92
46f5565faf Add more tests for boolean literals 2025-09-01 11:25:16 -04:00
PThorpe92
46182aa7ed add test for inserting boolean literals 2025-09-01 11:25:10 -04:00
PThorpe92
4bb2497d36 Parser: translate true and false to 0 and 1 literals 2025-09-01 11:24:12 -04:00
pedrocarlo
bc707fd9be cleanup + comments 2025-09-01 11:10:40 -03:00
pedrocarlo
53cfae1db4 return Error from step if IO failed 2025-09-01 11:10:39 -03:00
pedrocarlo
6f1eed7aca clippy 2025-09-01 11:10:39 -03:00
pedrocarlo
4618df9d1a because we can abort a read_page completion, this means that the page can be in the cache but be unloaded and unlocked. However, if we do not evict that page from the page cache, we will return an unloaded page later 2025-09-01 11:10:39 -03:00
pedrocarlo
be3f944c4f impl Error for CacheError and propagate it into LimboError 2025-09-01 11:10:39 -03:00
Pavan-Nambi
b343b79613 add details about table columns and how cdc behaves with transactions and stuff 2025-09-01 18:56:59 +05:30
Pavan Nambi
668213888d Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 18:16:53 +05:30
Pavan Nambi
5a6db2c2d5 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 18:16:40 +05:30
Pavan Nambi
6d6e8d2944 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 18:16:29 +05:30
Pavan Nambi
fa51256d4f Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 18:16:18 +05:30
Pekka Enberg
89fe0da26f Remove duplicate COPY directives from Antithesis Dockerfile 2025-09-01 14:22:39 +03:00
Pekka Enberg
d64263c09f Fix Antithesis Dockerfile 2025-09-01 14:21:55 +03:00
bit-aloo
c70fe79eb8 adjust test cfg and cleanup 2025-09-01 16:21:03 +05:30
bit-aloo
27a6dc95c4 simplify Cipher enum to store wrapper types
- Replace boxed `Aes256Gcm` and `Aegis256Cipher` with direct wrapper types:
  - `Cipher::Aes256Gcm(Aes256GcmCipher)`
  - `Cipher::Aegis256(Aegis256Cipher)`
- Add `as_aead()` method to unify access via `AeadCipher` trait.
- Refactor decrypt_raw and encrypt raw.
- Add decrypt_raw_detached and encrypt raw detached.
2025-09-01 16:19:37 +05:30
bit-aloo
7f3c886154 add Aes256GcmCipher implementing AeadCipher
- Create new `Aes256GcmCipher` wrapper around AES-256-GCM.
- Implement `AeadCipher` trait with both combined and detached modes.
2025-09-01 16:18:49 +05:30
Pavan Nambi
826c6c7ee6 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 16:18:23 +05:30
bit-aloo
f11e90c94d refactor Aegis256Cipher to implement AeadCipher 2025-09-01 16:18:22 +05:30
Pavan Nambi
2fb2366105 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 16:18:16 +05:30
bit-aloo
c685c4e735 Add AeadCipher trait abstraction
- Define a common trait `AeadCipher` for encryption/decryption.
- Provide methods for both "combined" and "detached" encryption modes:
  - encrypt / decrypt
  - encrypt_detached / decrypt_detached
2025-09-01 16:16:41 +05:30
bit-aloo
3a9b5cc6fa simplify aes-gcm imports and add tag size constants 2025-09-01 16:15:57 +05:30
Pavan Nambi
4538455fe4 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 16:05:53 +05:30
Pavan Nambi
d969902809 Update docs/manual.md
Co-authored-by: Jamie Barton <jamie@notrab.dev>
2025-09-01 16:05:46 +05:30