Commit Graph

8400 Commits

Author SHA1 Message Date
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
pedrocarlo
51a54d3c33 Fd should be part of Operation struct 2025-09-01 16:53:07 -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
pedrocarlo
1eb1171f55 do not fault on Fsync until we correctly define the expected behaviour in the simulator 2025-09-01 14:12:11 -03:00
pedrocarlo
c158db072b inject fault in the IO Operation in the MemorySim 2025-09-01 14:12:11 -03:00
pedrocarlo
be855a8059 IOCompletions: abort other remaining completions if previous one errors 2025-09-01 14:12:11 -03:00
pedrocarlo
bd8cfe40f1 impl remove_file for MemoryIO + skip completion if finished 2025-09-01 14:12:11 -03:00
pedrocarlo
cc3488bba0 print path in stats for memory IO 2025-09-01 14:12:11 -03:00
pedrocarlo
ff51965c3e fix shrinking to not include some properties that are present in faulty query, but that are not relevant to the error 2025-09-01 14:12:11 -03:00
pedrocarlo
fd4e74929a Cli option to enable memory IO 2025-09-01 14:12:11 -03:00
pedrocarlo
117451fba1 impl WriteV for MemorySim 2025-09-01 14:12:11 -03: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
24c0d24be6 impl Truncate for MemorySim 2025-09-01 11:11:25 -03:00
pedrocarlo
40de4c0606 initial impl for MemorySim 2025-09-01 11:11:25 -03:00
pedrocarlo
c01449e71b add parking_lot to simulator 2025-09-01 11:11:25 -03:00
pedrocarlo
8c7da3a704 impl SimIO for SimulatorIO 2025-09-01 11:11:03 -03:00
pedrocarlo
bc707fd9be cleanup + comments 2025-09-01 11:10:40 -03:00
pedrocarlo
d8e9f145e6 create SimIO trait 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