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
411c4f059a
Load compile time extensions on the initial db startup instead of once per conn
2025-07-21 19:09:31 -04: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
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
Pekka Enberg
55b5e45231
Merge 'bindings/rust: Return number of rows changed from Connection::execute()' from Rohith Suresh
...
Fixes #1904
This PR changes the existing behaviour of Connection.execute to not
return 0, but the number of rows that have been changed by the operation
within. The changes are:
1. Adds a getter for n_change and the execute function now returns the
n_change value
2. Integration test to test the behaviour
Closes #1987
2025-07-20 09:49:51 +03:00
RS2007
cd31119972
Fix: cargo clippy warning
2025-07-20 07:28:14 +05:30
RS2007
adf70dc855
Return number of rows changed from Connection.execute
2025-07-20 07:27:38 +05:30
Glauber Costa
4749ce95c1
implement Debug for Database
...
Very useful in printing data structures containing databases, like maps
Example output:
Connecting to Database { path: "sq.db", open_flags: OpenFlags(1), db_state: "initialized", mv_store: "none", init_lock: "unlocked", wal_state: "present", page_cache: "( capacity 100000, used: 0 )" }
2025-07-19 09:29:46 -05:00
Levy A.
8e8f1682df
add with_schema_mut
...
removes all repeated `Arc::make_mut`
2025-07-16 13:54:39 -03:00
Levy A.
d0e26db01a
use lock for database schema
2025-07-16 13:54:39 -03:00
Levy A.
4c77d771ff
only copy schema on writes
2025-07-16 13:54:36 -03:00
Diego Reis
817ad8d50f
Separate user-callable cacheflush from internal cacheflush logic
...
Cacheflush should only spill pages to WAL as non-commit frames, without checkpointing nor syncing. Check SQLite's sqlite3PagerFlush
2025-07-16 11:08:50 -03:00
Diego Reis
0e9771ac07
refactor: Change redundant "Status" enums to IOResult
...
Let's unify the semantics of "something done" or yields I/O into a
single type
2025-07-15 20:56:18 -03:00
Jussi Saurio
0ab0af912c
Merge 'bindings/js: fix more tests' from Mikaël Francoeur
...
Six more tests passing on Turso. The commits can be reviewed separately.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2085
2025-07-15 12:17:15 +03:00
meteorgan
d7bdfeb711
reinitialize WalFileShare when reset page size
2025-07-15 16:34:07 +08:00
meteorgan
b42a1ef272
minor improvements based on PR comments
2025-07-15 16:34:07 +08:00
meteorgan
f123c77ee8
fix set page_size in pager
2025-07-15 16:34:07 +08:00
meteorgan
e2ab673624
fix self.pager.replace() panic
2025-07-15 16:34:07 +08:00
meteorgan
a6faab17e9
fix query page size
2025-07-15 16:34:07 +08:00
meteorgan
cf126824de
Support set page size
2025-07-15 16:34:07 +08:00
Mikaël Francoeur
e25064959b
return info object
2025-07-14 14:35:48 -04:00
Nikita Sivukhin
9129991b62
add id,before,after,full modes
2025-07-14 11:16:06 +04:00
Jussi Saurio
a48b6d049a
Another post-rebase clippy round with 1.88.0
2025-07-12 19:10:56 +03:00
Nils Koch
1a91966c7e
fix clippy errors for rust 1.88.0 (manual fix)
2025-07-12 18:58:55 +03:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
Levy A.
cc17211189
direct btree calls
2025-07-11 15:04:28 -03:00
Pere Diaz Bou
511b80a062
do not assert connection is closed and return error on api
2025-07-08 16:47:03 +02:00
Pere Diaz Bou
ef41c19542
assert is not closed already
2025-07-08 15:58:11 +02:00
Pere Diaz Bou
5319af8fd8
set closed to cell
2025-07-08 15:55:50 +02:00
Pere Diaz Bou
8909e198ae
set closed flag for connection to detect force zombies
...
Let's make sure we don't keep using a connection after it was dropped.
In case of executing a query that was closed we will try to rollback and
return early.
2025-07-08 15:19:20 +02:00
Pekka Enberg
341f963a8e
Merge 'Fix infinite loops, rollback problems, and other bugs found by I/O fault injection' from Pedro Muniz
...
Was running the sim with I/O faults enabled and fixed some nasty bugs.
Now, there are some more nasty bugs to fix as well. This is the command
that I use to run the simulator `cargo run -p limbo_sim -- --minimum-
tests 10 --maximum-tests 1000`
This PR mainly fixes the following bugs:
- Not decrementing in flight write counter when `pwrite` fails
- not rolling back the transaction on `step` error
- not rolling back the transaction on `run_once` error
- some functions were just being unwrapped when they could suffer io
errors
- Only change max_frame after wal sync's
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com >
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com >
Closes #1946
2025-07-07 21:31:26 +03:00
pedrocarlo
6b60dd06c6
only rollback on write transaction
2025-07-07 12:10:54 -03:00
pedrocarlo
367002fb72
rename change_schema to schema_did_change
2025-07-07 11:58:16 -03:00
pedrocarlo
b85687658d
change instrumentation level to INFO
2025-07-07 11:53:45 -03:00
pedrocarlo
711b1ef114
make all run_once be run under statement or connection so that rollback is called
2025-07-07 11:51:25 -03:00
pedrocarlo
5559c45011
more instrumentation + write counter should decrement if pwrite fails
2025-07-07 11:50:21 -03:00
pedrocarlo
b69472b5a3
pass correct change schema to step rollback
2025-07-07 11:50:21 -03:00
pedrocarlo
897426a662
add error tracing to relevant functions + rollback transaction in step_end_write_txn + make move_to_root return result
2025-07-07 11:50:21 -03:00
Nikita Sivukhin
a10d423aac
adjust schema
2025-07-06 22:30:57 +04:00
Nikita Sivukhin
a988bbaffe
allow to specify table in the capture_data_changes PRAGMA
2025-07-06 22:19:32 +04:00
Nikita Sivukhin
04f2efeaa4
small renames
2025-07-06 21:16:57 +04:00
Nikita Sivukhin
3f0716b2a4
add capture_changes per-connection flag
2025-07-06 21:16:24 +04:00
pedrocarlo
56d87cb916
move disable behavior to connection instead of checkpoint
2025-07-03 12:05:53 -03:00
pedrocarlo
db005c81a0
add option to disable wal checkpoint
2025-07-03 12:04:17 -03:00
Pere Diaz Bou
c799396c3d
rollback schema in connection
2025-07-03 12:36:48 +02:00
Pere Diaz Bou
65a7fe13cf
remove lock from private schema copy
2025-07-03 12:36:48 +02:00
Pere Diaz Bou
abf1699dd2
set scheam version and update shared schema in txn
2025-07-03 12:36:48 +02:00
KaguraMilet
562dd389db
Merge branch 'tursodatabase:main' into buffer
2025-07-03 13:46:37 +08:00