Closes#2657Closes#2659Closes#2660Closes#2661
1. In simulator, do not assume every error that happens after fault
injection has the literal error message `"Injected fault"`. If an error
happened, all we need to do is not shadow the query into the in-memory
simulator environment -- in other words, we assume whatever the
statement did failed and was rolled back.
2. Do not begin or end transactions inside a nested statement. Nested
statements generally only occur when `ParseSchema` is invoked, which
runs the equivalent of `SELECT * FROM sqlite_schema`. This does not need
a new transaction nor does it need to end the transaction on error,
since the parent statement will handle it.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#2666
Right now it is buried under "console".
We have also not updated the list of commands when we added two more,
and this is done in this PR.
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes#2655
<img width="436" height="480" alt="image" src="https://github.com/user-
attachments/assets/d95572cf-b775-43d9-b3fa-b6b1c9ecc64d" />
(cherry-picked example, yes on io_uring we do well with some write
workloads against sqlite)
adds:
`make bench-sqlite VFS=io_uring SQL="insert into products (name,price)
values (1,2);" N=10000`
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2652
FaultyQuery was disabled. We were not simulating faults.
Reviewed-by: Avinash Sajjanshetty (@avinassh)
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2594
This PR lets us pretend we are younger than our real age, by using uv
like all the cool kids.
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes#2645
1. Find latest version available of a row for a specific transaction.
For that we need to keep track which txid is finding a row.
2. Support for schema_did_change on commit txn
3. Extract the connection transaction state from non mvcc transactions
to
mvcc too.
Closes#2642
There is an inconsistency now on how we are handling IDs and
notifications. Claude Code doesn't complain (good boi), but Claude
Desktop does.
Closes#2649
This not only changes schema_did_change on commit_txn for mvcc, but also
extracts the connection transaction state from non mvcc transactions to
mvcc too.
This is the first in a series of PRs whose end goal is to close the
#2004 issue, but I don't want to make that PR too bloated.
- Removes special `DeleteSavepoint` and uses the existing cursor
restoration mechanism.
- This required some restructuring of `DeleteState` to avoid cloning it,
i.e. some negotations with the borrow checker.
- CursorContext now takes a SeekOp as well to allow retaining the
behavior that we use LT for seeking after a delete-induced rebalancing.
This behavior will probably be removed as part of fixing #2004, but here
I am trying to preserve the current semantics.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#2638
- Removes special `DeleteSavepoint` and uses the existing cursor restoration
mechanism.
- This required some restructuring of `DeleteState` to avoid cloning it, i.e.
some negotations with the borrow checker.
- CursorContext now takes a SeekOp as well to allow retaining the behavior
that we use LT for seeking after a delete-induced rebalancing. This behavior
will probably be removed as part of fixing #2004, but here I am trying to
preserve the current semantics.
When playing with our MCP server with Claude Code, I realized that
having the agent pre-configured to a specific path is just not very
useful.
I am now adding two new commands, to open a database and to list the
current database. Those make our server more useful.
Closes#2628
We recently merged a change that panics the sim on parse errors, because
not doing so has masked many scenarios where the sim unintentionally
creates incorrect sql and we just ignore it.
The aforementioned change also surfaced that the sim can try to create a
table that already exists, which now makes us panic and fail the sim. So
in this PR, we make sure that doesn't happen.
We already have Property::DoubleCreateFailure to assert that the same
table cannot be created twice, so this should not hide any bugs.
Closes#2634
We recently merged a change that panics the sim on parse errors, because
not doing so has masked many scenarios where the sim unintentionally
creates incorrect sql and we just ignore it.
We already have Property::DoubleCreateFailure to assert that the same table
cannot be created twice, so this should not hide any bugs.
Closes#2618 (sufficiently for now, IMO)
Prevents simulator from creating malformed queries which we don't notice
(ref e.g. #2609 , #2611, #2616)
Closes#2624
We were not generating table_info for views. This PR fixes it. We were
so far storing columns as strings with just their names - since this is
all we needed - but we will move now to store Columns. We need to
convert the names to Column anyway for table_info to work.
Closes#2625
We have halt and op_halt, doing essentially the same thing.
This PR unifies them. There is a minor difference between them now in
the way halt() handles auto-commit. My current understanding of the code
is that what we have in halt *is a bug*, which is already one bad
consequence of the duplication.
Closes#2631