Commit Graph

24 Commits

Author SHA1 Message Date
TcMits
4211460ef3 fmt 2025-09-30 12:28:24 +07:00
TcMits
d3d6a015ec fix issue 3425 2025-09-30 12:25:20 +07:00
Pekka Enberg
433b60555f Add BEGIN CONCURRENT support for MVCC mode
Currently, when MVCC is enabled, every transaction mode supports
concurrent reads and writes, which makes it hard to adopt for existing
applications that use `BEGIN DEFERRED` or `BEGIN IMMEDIATE`.

Therefore, add support for `BEGIN CONCURRENT` transactions when MVCC is
enabled. The transaction mode allows multiple concurrent read/write
transactions that don't block each other, with conflicts resolved at
commit time. Furthermore, implement the correct semantics for `BEGIN
DEFERRED` and `BEGIN IMMEDIATE` by taking advantage of the pager level
write lock when transaction upgrades to write. This means that now
concurrent MVCC transactions are serialized against the legacy ones when
needed.

The implementation includes:

- Parser support for CONCURRENT keyword in BEGIN statements

- New Concurrent variant in TransactionMode to distinguish from regular
  read/write transactions

- MVCC store tracking of exclusive transactions to support IMMEDIATE and
  EXCLUSIVE modes alongside CONCURRENT

- Proper transaction state management for all transaction types in MVCC

This enables better concurrency for applications that can handle
optimistic concurrency control, while still supporting traditional
SQLite transaction semantics via IMMEDIATE and EXCLUSIVE modes.
2025-09-11 16:05:52 +03:00
TcMits
e725814ce8 fix test 2025-09-05 13:38:33 +07:00
TcMits
0f9ae5853c test 2025-09-05 13:19:22 +07:00
TcMits
4726ffaa74 only check 'e' in eat_number 2025-09-05 13:08:42 +07:00
TcMits
168f6dcbb5 unrelated comments 2025-09-05 13:00:07 +07:00
TcMits
f2d4087462 support float without fractional part 2025-09-05 12:58:28 +07:00
TcMits
d298480e4a Merge branch 'main' into perf-3 2025-09-02 18:13:58 +07:00
TcMits
190e9bcc95 add match_ignore_ascii_case macro 2025-08-31 14:35:03 +07:00
Levy A.
678ca8d33b feat(parser): add ALTER COLUMN 2025-08-30 03:10:39 -03:00
Levy A.
8a610a776f refactor: Result type alias 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.
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
TcMits
e90e154f51 fmt 2025-08-15 17:09:30 +07:00
TcMits
4d91f19ab2 rebase 2025-08-15 17:05:28 +07:00
TcMits
22f53d1fe6 clippy again 2025-08-15 16:45:18 +07:00
TcMits
f0bd4cca69 clippy 2025-08-15 16:45:18 +07:00
TcMits
bbd96d263c finish REINDEX 2025-08-15 16:45:08 +07:00
TcMits
c444b80d2e finish CREATE VIRTUAL TABLE 2025-08-12 19:14:10 +07:00
TcMits
2796121e07 test exprs 2025-08-07 15:40:36 +07:00
TcMits
e93e50ad67 more tests 2025-08-06 18:29:14 +07:00
TcMits
436d21c81d create turso_parser crate 2025-08-06 15:42:51 +07:00