Pekka Enberg
710b43d2c4
Add Github workflow for Turso serverless package
2025-07-22 13:38:51 +03:00
Pekka Enberg
68169a7b58
Merge 'Work around CREATE TABLE whitespace issue' from Jussi Saurio
...
`BTreeTable::to_sql` makes us incompatible with SQLite by losing e.g.
the original whitespace provided during the CREATE TABLE command. For
example:
`CREATE TABLE t (x)` gets saved as `CREATE TABLE t (x)`.
Sqlite preserves the user-provided whitespace.
For now let's fix our tests by regex-replacing every CREATE TABLE in the
entire repo to have exactly 1 space after the table name in the CREATE
TABLE statement.
I also added a FIXME in the doc comment for `BTreeTable::to_sql`, and
opened https://github.com/tursodatabase/turso/issues/2224
Closes #2223
2025-07-22 13:38:20 +03:00
Jussi Saurio
022f679fab
chore: make every CREATE TABLE stmt in entire repo have 1 space after tbl name
...
`BTreeTable::to_sql` makes us incompatible with SQLite by losing e.g. the original whitespace provided during the CREATE TABLE command.
For now let's fix our tests by regex-replacing every CREATE TABLE in
the entire repo to have exactly 1 space after the table name in the
CREATE TABLE statement.
2025-07-22 11:35:21 +03:00
Pekka Enberg
f83870731d
testing/sqlite3: Import ALTER TABLE tests
...
Imported from SQLite 3.50.2
2025-07-22 11:27:52 +03:00
Pekka Enberg
d634a28890
Merge 'Fix issues in alter table tests and fix a small error in BTreeTable::to_sql' from Jussi Saurio
...
Closes #2186
```git
commit 2095e5dde1 (HEAD -> fix-alter-table, origin/fix-alter-table, main)
Author: Jussi Saurio <jussi.saurio@gmail.com >
Date: Tue Jul 22 11:12:02 2025 +0300
test/tcl: run alter_table.test in all.test
commit 58f98391d0
Author: Jussi Saurio <jussi.saurio@gmail.com >
Date: Tue Jul 22 11:11:50 2025 +0300
test/tcl: fix alter table test assertions and require index flag on some tests
commit 13d40c6a73
Author: Jussi Saurio <jussi.saurio@gmail.com >
Date: Tue Jul 22 11:11:08 2025 +0300
schema: fix extra whitespace in BTreeTable::from_sql
```
Closes #2222
2025-07-22 11:20:48 +03:00
Pekka Enberg
eab71d2ee2
Update README.md
2025-07-22 11:20:01 +03:00
Pekka Enberg
b6d3371d46
Update README.md
2025-07-22 11:12:46 +03:00
Jussi Saurio
2095e5dde1
test/tcl: run alter_table.test in all.test
2025-07-22 11:12:02 +03:00
Jussi Saurio
58f98391d0
test/tcl: fix alter table test assertions and require index flag on some tests
2025-07-22 11:11:50 +03:00
Jussi Saurio
13d40c6a73
schema: fix extra whitespace in BTreeTable::from_sql
2025-07-22 11:11:08 +03:00
Pekka Enberg
0a6f99f3d9
Merge 'Add Rickrolling Turso blog post to contrib' from Avinash Sajjanshetty
...
Closes #2218
2025-07-22 11:10:31 +03:00
Avinash Sajjanshetty
4e91ed1201
Add Rickrolling Turso blog post to contrib
2025-07-22 13:07:33 +05:30
Pekka Enberg
f10723779d
bindings/javascript: Add Drizzle example
2025-07-22 10:35:30 +03:00
Pekka Enberg
f979903633
Merge 'Load static extensions once and store on Database instead of once per connection' from Preston Thorpe
...
To help make the connection speed faster, we don't need to register
these every time as they are compiled in.
Closes #2213
2025-07-22 09:16:22 +03:00
Pekka Enberg
830f3c7276
Fix typo in insert.ts
2025-07-22 09:12:30 +03:00
Pekka Enberg
30de02d526
testing: Add test case for duplicate SET in UPDATE
...
Refs #2117
2025-07-22 09:08:14 +03:00
Pekka Enberg
afc22da07c
Merge 'Fix duplicate SET statement compatibility with SQLite' from Ihor Andrianov
...
For duplicate SET statements, SQLite uses last one
Closes #2117
2025-07-22 09:02:16 +03:00
Pekka Enberg
b03fe4669a
Merge 'wal: write txn fail in case max_frame change midway' from Pere Diaz Bou
...
A write txn can only start if the current snapshot held by writer is
consistent with the one in shared state
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2204
2025-07-22 09:01:44 +03:00
Pekka Enberg
c1ee91f500
Merge 'Add @tursodatabase/serverless package' from Pekka Enberg
...
This package is for serverless access to the Turso Cloud using SQL over
HTTP protocol. The purpose of this package is to provide the same
interface as `@tursodatabase/turso`, but for serverless environments
that cannot host the database engine.
The package also provides a `@libsql/client` compatibility layer in the
`@tursodatabase/serverless/compat` module for drop-in replacement for
existing clients.
Closes #2209
2025-07-22 08:56:22 +03:00
PThorpe92
a92126961d
Remove duplicate case and just send Mutex along with schema for extension registrations
2025-07-21 20:06:14 -04:00
PThorpe92
d514304ac2
Remove unneeded changes
2025-07-21 19:24:24 -04:00
PThorpe92
f7ba8efdbd
Switch back to std::mutex because it was an unnecessary change
2025-07-21 19:20:17 -04:00
PThorpe92
5e5b3ce071
Fix leak of extension CTX in cli/app
2025-07-21 19:09:58 -04:00
PThorpe92
411c4f059a
Load compile time extensions on the initial db startup instead of once per conn
2025-07-21 19:09:31 -04:00
PThorpe92
5ebd3f7271
Change api of extension api context to support static extensions held on db
2025-07-21 19:08:27 -04:00
Pekka Enberg
7765bafb13
Add @tursodatabase/serverless package
...
This package is for serverless access to the Turso Cloud using SQL over
HTTP protocol. The purpose of this package is to provide the same
interface as `@tursodatabase/turso`, but for serverless environments
that cannot host the database engine.
The package also provides a `@libsql/client` compatibility layer in the
`@tursodatabase/serverless/compat` module for drop-in replacement for
existing clients.
2025-07-21 22:03:43 +03:00
Pekka Enberg
8f83b150b7
Merge 'Implement pragma database_list' from Glauber Costa
...
And also the CLI option .databases, which is just manipulating that.
This is one step in the road to attach.
Closes #2195
2025-07-21 17:13:26 +03:00
Glauber Costa
0545049d59
Implement pragma database_list
...
And also the CLI option .databases, which is just manipulating that.
This is one step in the road to attach.
2025-07-21 08:49:35 -05:00
Pekka Enberg
be88325fa8
Merge 'test/clickbench: fix clickbench' from Jussi Saurio
...
- enable indexes, otherwise it doesnt work at all
- rename limbo to tursodb
- use mode=list instead of mode=pretty for less bulky tursodb results
Closes #1925
Closes #2200
2025-07-21 15:01:26 +03:00
Pekka Enberg
a22c4b3b53
Merge 'Improve Antithesis tests' from Pekka Enberg
...
Improve the Antithesis parallel drivers:
* Enable indexes in the runs.
* Add `CREATE INDEX` and `DROP INDEX` parallel drivers.
* Add `CREATE TABLE`, `DROP TABLE`, and `ALTER TABLE` parallel drivers.
Closes #2203
2025-07-21 15:01:07 +03:00
Pekka Enberg
632e1a2952
antithesis: Improve index creation to sometimes use DESC too
2025-07-21 14:17:24 +03:00
Pekka Enberg
cd494a6ccd
antithesis: Add ALTER TABLE parallel driver
2025-07-21 14:17:24 +03:00
Pere Diaz Bou
1933815233
wal: write txn fail in case max_frame change midway
...
A write txn can only start if the current snapshot held by writer is
consistent with the one in shared state
2025-07-21 13:08:56 +02:00
Pere Diaz Bou
fae0a67ff7
Merge ' core/lib: init_pager lock shared wal until filled ' from Pere Diaz Bou
...
maybe_shared_wal's lock is held for a limited time increasing the chance
of initializing the shared wal twice.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2201
2025-07-21 13:06:41 +02:00
Pere Diaz Bou
6dd8f6561d
clippy
2025-07-21 12:53:56 +02:00
Jussi Saurio
d308f4d206
Merge 'fix/sim: actually enable indexes by default' from Jussi Saurio
...
Follow up to #2199 that _actually_ enables indexes by default in sim
Closes #2202
2025-07-21 13:44:51 +03:00
Pere Diaz Bou
4c59695351
test_multi_thread: ignore tests for now
2025-07-21 12:43:31 +02:00
Pekka Enberg
08e1f4a971
antithesis: Add DROP TABLE parallel driver
2025-07-21 13:40:28 +03:00
Pekka Enberg
bd30cb313c
antithesis: Add CREATE TABLE parallel driver
2025-07-21 13:40:28 +03:00
Pekka Enberg
9788a8739c
antithesis: Add DROP INDEX parallel driver
2025-07-21 13:40:28 +03:00
Pekka Enberg
02ccdd7194
antithesis: Add CREATE INDEX parallel driver
2025-07-21 13:40:28 +03:00
Jussi Saurio
e604a80e93
fix/sim: actually enable indexes by default
2025-07-21 13:35:11 +03:00
Pekka Enberg
ade013ae88
antithesis: Add shuffle-run.sh helper script
2025-07-21 12:56:20 +03:00
Pekka Enberg
29e7b41ca5
antithesis: Create indexes in first_setup.py
2025-07-21 12:55:37 +03:00
Pekka Enberg
0ebe6bb933
antithesis-tests: Enable indexes in Antithesis parallel drivers
2025-07-21 12:49:38 +03:00
Pekka Enberg
993079e39d
bindings/python: Add "experimental_indexes" parameter to connect()
2025-07-21 12:49:38 +03:00
Pekka Enberg
87f0229e1f
Merge 'test/stress&sim: enable indexes by default' from Jussi Saurio
...
Life is too boring without any simulator-created issues
Closes #2199
2025-07-21 12:39:57 +03:00
Pere Diaz Bou
c55cb74dc8
simple write multi threaded test
2025-07-21 11:06:31 +02:00
Pere Diaz Bou
e3fdb6bab9
core/lib: init_pager lock shared wal until filled
...
maybe_shared_wal's lock is held for a limited time increasing the chance
of initializing the shared wal twice.
2025-07-21 11:00:34 +02:00
Jussi Saurio
78320464ce
test/clickbench: fix clickbench
...
- enable indexes, otherwise it doesnt work at all
- rename limbo to tursodb
- use mode=list instead of mode=pretty for less bulky tursodb results
2025-07-21 12:00:04 +03:00