Krishna Vishal
f3b169bf30
Fix empty blob test failure.
2025-07-14 03:28:54 +05:30
Krishna Vishal
9b315d1d7e
Manually inline the record deserialization code for performance.
...
This is done because the compiler is refusing to inline even after
adding inline hint.
- Get refvalues from directly from registers without using
`make_record`
2025-07-14 03:28:54 +05:30
Krishna Vishal
f0e8e5871b
Replace compare_immutable with compare_records_generic
2025-07-14 03:28:54 +05:30
Krishna Vishal
860de412d9
Add num_columns to BTreeCursor so we can initialize
...
`Vecs` inside `RecordCursor` to their appropriate to reduce
allocations.
2025-07-14 03:28:54 +05:30
Krishna Vishal
ef147181c2
Working version of the incremental column and "optimal" record
...
compare functions. Now we optimize them
2025-07-14 03:28:54 +05:30
Krishna Vishal
692f0413eb
Stash
2025-07-14 03:28:54 +05:30
Krishna Vishal
515712b7f2
Fix sorter
2025-07-14 03:28:54 +05:30
Krishna Vishal
601540af6e
Make OP_column do on demand serialization baby!
2025-07-14 03:28:54 +05:30
Jussi Saurio
a48b6d049a
Another post-rebase clippy round with 1.88.0
2025-07-12 19:10:56 +03:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
Jussi Saurio
b015fabb26
vdbe: fix panic when first value added to min()/max() accumulator is null
2025-07-10 21:02:57 +03:00
Jussi Saurio
63c5698050
vdbe: remove error prints from min()/max() and simplify
2025-07-10 21:02:57 +03:00
KaguraMilet
9d6ae78786
Merge branch 'tursodatabase:main' into distance
2025-07-10 19:15:08 +08:00
Jussi Saurio
c9a6c289e0
clippy
2025-07-09 14:26:43 +03:00
Jussi Saurio
38650eee0e
VDBE: fix op_insert re-entrancy
...
when updating last_insert_rowid we call return_if_io!(cursor.rowid())
which yields IO on large records. this causes op_insert to insert and
overwrite the same row many times. we need a state machine to ensure
that the insertion only happens once and the reading of rowid can
independently yield IO without causing a re-insert.
2025-07-09 14:26:40 +03:00
Jussi Saurio
c752058a97
VDBE: introduce state machine for op_idx_insert for more granular IO control
...
Separates cursor.key_exists_in_index() into a state machine. The problem with
the main branch implementation is this:
`return_if_io!(seek)`
`return_if_io!(cursor.record())`
The latter may yield on IO and cause the seek to start over, causing an infinite
loop. With an explicit state machine we can control and prevent this.
2025-07-09 11:43:18 +03:00
meteorgan
3065416bb2
cargo fmt
2025-07-08 22:57:20 +08:00
meteorgan
08be906bb1
return early if index is not found in op_idx_delete
2025-07-08 22:57:20 +08:00
meteorgan
f44d818400
cargo fmt
2025-07-08 22:57:20 +08:00
meteorgan
c6ef4898b0
fix: IdxDelete shouldn't raise error if P5 == 0
2025-07-08 22:57:20 +08:00
Pere Diaz Bou
232beddf62
vdbe: fix compilation
2025-07-08 16:15:29 +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
Jussi Saurio
cb8a576501
op_idx_insert: introduce flag for ignoring duplicates
2025-07-08 12:14:20 +03:00
Nikita Sivukhin
d8fb321b16
treat ImmutableRecord as Value::Blob
2025-07-08 10:28:11 +04: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
9632ab0a41
rollback transaction when we fail in step
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
KaguraMilet
ac95758f76
feat(vector): integrate euclidean distance into limbo
2025-07-07 21:11:51 +08: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
cf7ae031c7
add ProgramBuilderFlags to the builder
2025-07-06 21:16:25 +04:00
Krishna Vishal
fc8403991b
Fix Glob ScalarFunc to handle NULL and other Value types.
...
Fixes: https://github.com/tursodatabase/turso/issues/1953
2025-07-06 13:18:21 +05:30
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
6b16950488
fmt
2025-07-03 12:36:48 +02:00
Pere Diaz Bou
2414502268
parse schema set auto_commit false in nested query
2025-07-03 12:36:48 +02:00
Pere Diaz Bou
d8658264d9
alter set cookie
2025-07-03 12:36:48 +02: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
Nikita Sivukhin
c9c5ef4e25
remote query_mode from ProgramBuilderOpts and from function arguments
...
- mode never changes and ProgramBuilder already created with proper mode set correctly
2025-07-02 13:24:12 +04:00
Pekka Enberg
e718cfef6b
Merge 'Add opening new connection from a sqlite compatible URI, read-only connections' from Preston Thorpe
...
@penberg reminded me that this never got integrated :)
Closes #1908
2025-07-02 08:05:36 +03:00
KaguraMilet
aca08238d8
fix buffer pool is not thread safe problem
2025-07-01 16:06:55 +08:00