Pekka Enberg
ef32a82941
core/vdbe: Integrate MVCC transactions
2025-03-06 10:16:42 +02:00
Pekka Enberg
461be0dc87
core: Add multi-version store to Database
2025-03-06 10:16:42 +02:00
Pekka Enberg
96175cccf7
cli: Add --experimental-mvcc option to enable MVCC
2025-03-06 10:16:42 +02:00
Pekka Enberg
5d0982f5db
core/mvcc: Add RowID::new() and Row::new() helpers
2025-03-06 09:59:40 +02:00
Pekka Enberg
4247974f95
core/mvcc: Add insert() helper to Cursor
2025-03-06 09:32:48 +02:00
Pekka Enberg
b7382ffab1
core/mvcc: Switch Cursor to use Rc instead of lifetimes
2025-03-06 09:31:34 +02:00
Pekka Enberg
ff6d9465eb
core/mvcc: Improve trace logging
2025-03-06 09:31:04 +02:00
Pere Diaz Bou
aa7391da50
fix halt return
2025-03-05 22:32:59 +01:00
Pere Diaz Bou
b555561aeb
make Program::halt reentrant
2025-03-05 22:32:59 +01:00
Pere Diaz Bou
7aae885af4
add logs to wal locks
2025-03-05 22:32:59 +01:00
Pere Diaz Bou
feeb398e73
finish transaction and reset transaction state
2025-03-05 22:32:59 +01:00
Pekka Enberg
81b79bc833
core/mvcc: Eliminate row generic types
...
The logging code that writes out transactions to disk needs to write out
the byte array that we actually use. The code is less hairly without the
generics so drop them.
2025-03-05 19:17:16 +02:00
Pere Diaz Bou
262c4de548
add line number and thread id to tracing logs
2025-03-05 15:36:47 +01:00
Pere Diaz Bou
9a01e32c01
add tracing_subscriber and test_log::test
...
I don't know when and why we dropped log::* in favor of tracing but when it was done, it made relevant logs not appear any more while debugging so... I added test_log::test which helps by automatically adding info logs from trace package.
2025-03-05 15:36:06 +01:00
Pere Diaz Bou
5f5ca50c41
Move schema lock read to translate only
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
b63f541150
impl Send Sync for GenericFile
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
d1e7f0826b
impl Send Sync for WindowsFile
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
3d3cdbeb0c
fix generic and windows sync compilation
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
ab2fc3fb13
fix clippy arc warnings for now
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
d1c7d758c4
fix uring Sync,Sync unsafe impl
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
47cd54a7fe
remove schema comment
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
e20dd59353
Make schema a RWLock
...
This makes it work like in SQLite where only one schema writer is permitted and readers will return error while preparing statement if the schema is changing.
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
e4a8ee5402
move load extensions to Connection
...
Extensions are loaded per connection and not per database as per SQLite
behaviour. This also helps with removing locks.
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
0149e86356
add todo comments to remove mutex from database structures
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
8daf7666d1
Make database Sync + Send
2025-03-05 14:07:48 +01:00
pedrocarlo
99d979eb80
first version of vtable with keyword autocomplete
2025-03-04 14:43:07 -03:00
Pekka Enberg
f57d2b32af
core: Clean up B-Tree creation code
...
Move page allocation to pager so that we don't need to instantiate a
cursor to create a B-Tree.
2025-03-04 18:38:06 +02:00
Pekka Enberg
f3ee86d784
core/vdbe: Replace get_btree_{table,index}_cursor() calls with get_cursor()
2025-03-04 15:17:57 +02:00
Pekka Enberg
cdcaebb878
core/vdbe: Unify B-Tree cursors
2025-03-04 14:35:40 +02:00
Pekka Enberg
1c0d9c3b46
core/vdbe: Replace get_pseudo_cursor() calls with get_cursor()
2025-03-04 14:18:52 +02:00
Pekka Enberg
c12f2aeca4
core/vdbe: Replace get_sorter() calls with get_cursor()
2025-03-04 13:51:05 +02:00
Pekka Enberg
45539a4fe5
core/vdbe: Replace get_vtab_cursor() calls with get_cursor()
2025-03-04 13:43:49 +02:00
Pekka Enberg
085f93ce79
core/vdbe: Add ProgramState::get_cursor() helper
2025-03-04 12:23:35 +02:00
Pekka Enberg
3aeb11b673
core/vdbe: Add ProgramStatem::get_btree_{table,index}_cursor() helpers
2025-03-04 11:40:43 +02:00
Pekka Enberg
222808ab6c
ore/vdbe: Add ProgramState::get_pseudo_cursor() helper
2025-03-04 11:21:24 +02:00
Pekka Enberg
06446b768b
core/vdbe: Add ProgramState::get_sorter() helper
2025-03-04 11:18:09 +02:00
Pekka Enberg
e4ebb6d9e1
core/vdbe: Add ProgramState::get_vtab_cursor() helper
2025-03-04 11:16:29 +02:00
Pekka Enberg
dc525dd7d1
core/vdbe: Kill call_external_function macro
...
The call_external_function macro has exactly one call-site and,
therefore, only makes the code harder to read.
2025-03-04 11:01:09 +02:00
Pekka Enberg
ddb188132c
Merge 'Clean up extension types API, introduce json text subtype' from Preston Thorpe
...
This PR cleans up some comments in the extension API and prevents
extensions themselves from calling 'free' on Value types that are
exposed to the user facing traits, as well as changes the `from_ffi`
method for OwnedValues to take ownership and automatically free the
values to prevent memory leaks.
This PR also finds the name of the `args: &[Value]` argument for scalar
functions in extensions, and uses that in the proc macro, instead of
relying on documentation to communicate that the parameter must be named
`args`.
Closes #1054
2025-03-04 10:24:19 +02:00
Pekka Enberg
2e4c18dca2
Merge 'Escape character is ignored in LIKE function' from lgualtieri75
...
Fixes #1051
Reviewed-by: Preston Thorpe (@PThorpe92)
Closes #1074
2025-03-04 10:23:09 +02:00
Pekka Enberg
cedfa92b22
Merge 'Add sqlean ipaddr extension' from EmNudge
...
Relatively simple one, although I notice we don't have a lot of testing
here. The extensions have all their tests in the python cli extension
tests. Do we want to keep it that way or motivate inline rust tests for
these modules?
Closes #1081
2025-03-04 10:21:11 +02:00
Pere Diaz Bou
1de4861414
fix balance_non_root should trigger balance again
2025-03-02 23:16:32 +01:00
Pere Diaz Bou
10824e3eb3
remove new_pages, remove extra divider_cells and cells capacity
2025-03-02 22:49:20 +01:00
Pere Diaz Bou
0da12df67c
Introduce BalanceInfo to hold all balance procedure information
2025-03-02 22:42:48 +01:00
EmNudge
116350d139
Add ipaddr extension
2025-03-02 16:03:46 -05:00
PThorpe92
588e43c5aa
Minor improvements and cleanups in btree
2025-03-01 15:48:42 -05:00
PThorpe92
741c4e8037
Add json subtype for extension value text type
2025-03-01 14:27:33 -05:00
PThorpe92
5b8efd92a4
Update extension ownership cleanups for new vtab module
2025-03-01 14:27:33 -05:00
PThorpe92
e7713e87ec
Prevent extensions from accidentally freeing value types, fix comments
2025-03-01 14:27:33 -05:00
l.gualtieri
6449c79e93
Escape character is ignored in LIKE function #1051
2025-03-01 18:32:09 +01:00