Commit Graph

8400 Commits

Author SHA1 Message Date
Pekka Enberg
92bf7b3daa Merge 'Fix blob type handling in JavaScript' from Pekka Enberg
Closes #2732
2025-08-22 15:40:24 +03:00
Pekka Enberg
52ef4c2dfe Merge 'correctly implement offset() in parser' from Lâm Hoàng Phúc
Closes #2731
2025-08-22 15:40:18 +03:00
Pekka Enberg
5ac9195e93 Merge 'move check code into parser' from Lâm Hoàng Phúc
Closes #2730
2025-08-22 15:40:00 +03:00
Pekka Enberg
ce6b824837 Merge 'Serialize compat tests and use Mutex::lock() instead of Mutex::try_lock() in UnixIO' from Jussi Saurio
Closes #2715
1. Since our multithreading isn't proven correct (and is actually
probably all kinds of incorrect), let's serialize these tests since they
operate on the same database
2. Use `lock()` instead of `try_lock()` - i.e. wait to obtain the lock
on the file instead of immediately erroring if we can't

Closes #2729
2025-08-22 15:39:26 +03:00
Pekka Enberg
a259d123de testing/javascript: Add test case for blobs 2025-08-22 14:17:45 +03:00
Pekka Enberg
9aff35e5af packages/turso-serverless: Fix blob type handling 2025-08-22 14:17:40 +03:00
Pekka Enberg
2c68613709 bindings/javascript: Fix blob type handling 2025-08-22 14:17:40 +03:00
TcMits
81603f6706 correctly implement offset() in parser 2025-08-22 17:47:39 +07:00
TcMits
4b07555e87 remove dup test 2025-08-22 17:02:10 +07:00
TcMits
f49c47f248 remove dup check 2025-08-22 16:47:41 +07:00
TcMits
df8ab9c104 clippy again 2025-08-22 16:39:59 +07:00
TcMits
a1bc3bf988 clippy 2025-08-22 16:36:10 +07:00
TcMits
14eb8a8ffe move check code into parser 2025-08-22 16:28:56 +07:00
Jussi Saurio
14873c76fb unixio: use Mutex::lock() instead of Mutex::try_lock()
we should wait to obtain the lock, not immediately fail if we cant.
2025-08-22 10:47:50 +03:00
Jussi Saurio
6c7abc5caa Serialize compat tests to prevent file locking failures 2025-08-22 10:38:47 +03:00
Jussi Saurio
cf64452139 Merge 'sim: remove "run_once faults"' from Jussi Saurio
This kind of fault does not semantically represent anything real, since
we already have fault injection for every concrete IO operation like
reading, writing, syncing and so forth.
Moreover, having this feature is the direct cause of the false positive
simulator failure as reported in issue #2727. There, a "run_once fault"
happened immediately after we fsynced following an INSERT, which caused
the simulator to think the INSERT failed, and later a sim assertion
failed because the on-disk database had 1 more row than it thought it
would.
Closes #2727

Reviewed-by: Pekka Enberg <penberg@iki.fi>

Closes #2728
2025-08-22 10:30:36 +03:00
Jussi Saurio
cc643362a4 sim: remove "run_once faults"
This kind of fault does not semantically represent anything real,
since we already have fault injection for every concrete IO operation
like reading, writing, syncing and so forth.

Moreover, having this feature is the direct cause of the false positive
simulator failure as reported in issue #2727. There, a "run_once fault"
happened immediately after we fsynced following an INSERT, which caused
the simulator to think the INSERT failed, and later a sim assertion failed
because the on-disk database had 1 more row than it thought it would.
2025-08-22 10:13:06 +03:00
Pekka Enberg
b9bb859271 Merge 'Switch to new parser in core' from Levy A.
Integrate #2381 to core. Resolves #2337.

Reviewed-by: Lâm Hoàng Phúc (@TcMits)

Closes #2650
2025-08-22 10:06:37 +03:00
Levy A.
34724a0571 fix: proper parser offset tracking 2025-08-22 02:11:53 -03:00
Pekka Enberg
156352fabc Merge ' should not return a Completion when there is a page cache hit' from Pedro Muniz
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2723
2025-08-22 07:33:28 +03:00
Pekka Enberg
b4b156cca9 Merge 'github: Remove Intel Mac support' from Pekka Enberg
They're very close to end of life and we're having macOS runner
availability problems.

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

Closes #2726
2025-08-22 07:33:18 +03:00
Pekka Enberg
3547bd1093 github: Remove Intel Mac support
They're very close to end of life and we're having macOS runner
availability problems.
2025-08-21 23:59:15 +03:00
Pekka Enberg
f1bde3c12c Merge 'github: Reduce Python build matrix' from Pekka Enberg
Test with the earliest and latest supported versions, but skip the ones
in the middle to reduce our Python CI build matrix.

Closes #2724
2025-08-21 23:50:19 +03:00
Jussi Saurio
4edbf3aac0 Merge 'Page cache truncate' from Nikita Sivukhin
Add `truncate` method in the page cache which remove all entries which
reference pages greater than new DB size.
This will be used in the sync engine as in its case DB size can shrink
when we "rebase" changes from remote to local.
It stands on the #2707 because touch few files from that PR

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

Closes #2711
2025-08-21 23:34:39 +03:00
Levy A.
ee12ef9fb5 remove unnecessary Box<ast::Select> 2025-08-21 17:20:25 -03:00
Pekka Enberg
b5dafe2f07 github: Reduce Python build matrix
Test with the earliest and latest supported versions, but skip the ones
in the middle to reduce our Python CI build matrix.
2025-08-21 22:50:51 +03:00
Mikaël Francoeur
5ed2abf23f remove Result from signature 2025-08-21 14:45:00 -04:00
Levy A.
8a610a776f refactor: Result type alias 2025-08-21 15:24:01 -03:00
Levy A.
07975603d3 fix: incorrect sql statement in parser test 2025-08-21 15:24:01 -03:00
Levy A.
d9c7cbf7f2 fix: report TK_ILLEGAL as error 2025-08-21 15:24:01 -03:00
Levy A.
0138aade31 tidy error reporting 2025-08-21 15:24:01 -03:00
Levy A.
8f198a3086 fix create view columns length check 2025-08-21 15:24:01 -03:00
Levy A.
a86a066a91 fix order by function clause 2025-08-21 15:24:01 -03:00
Levy A.
4ba1304fb9 complete parser integration 2025-08-21 15:23:59 -03:00
Levy A.
c6b032de63 feat: add AST formating and checking 2025-08-21 15:19:17 -03:00
Levy A.
f8daf2ff95 fix: copy TokenType's as_str from the old parser 2025-08-21 15:19:17 -03:00
Levy A.
b0537d02c7 fix: SQLite operators are left associative 2025-08-21 15:19:16 -03:00
Levy A.
40fce89238 fix: empty variables are allowed 2025-08-21 15:19:16 -03:00
Levy A.
8f10f2f240 fix number parser
the added test case was failing
2025-08-21 15:19:16 -03:00
Levy A.
dd39f47cda feat: add materialized view + implement essential methods for core 2025-08-21 15:19:16 -03:00
Levy A.
186e2f5d8e switch to new parser 2025-08-21 15:19:16 -03:00
pedrocarlo
6b0ed08465 read_page should return No Completion when have a page cache hit 2025-08-21 14:39:24 -03:00
Avinash Sajjanshetty
3090545167 use encryption ctx instead of encryption key 2025-08-21 22:36:32 +05:30
Avinash Sajjanshetty
cc8c763942 refactor encryption module and make it configurable 2025-08-21 22:36:31 +05:30
Pekka Enberg
ae8b1eb00d Merge 'core/io: Don't open file as non-blocking in Unix backend' from Pekka Enberg
The Unix backend is a syscall()-based, blocking implementation. The
O_NONBLOCK adds nothing.

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

Closes #2708
2025-08-21 19:13:39 +03:00
Nikita Sivukhin
fdb80746be fix clippy 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
b7c033be20 add tests 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
94ed92ca4e fix compilation and clippy 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
4653f78356 fix compilation 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
7720e07931 allow to mix frames push with sql execution in the single WAL session
- we will use this in the sync engine
2025-08-21 18:28:16 +04:00