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
Currently during `Restart|Truncate` modes we properly restart the WAL
header in the `WalFileShared`, but keep a stale one on the current
`WalFile` instance.
Closes#2627
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.
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.
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.
Also fixes an issue where since the old Database wasn't `Drop`d, it
caused an issue with the static Registry ™️ that had broken
`--doublecheck` mode.
Closes#2623
This continues the work for `printf` support from from tthe issue
https://github.com/tursodatabase/turso/issues/885.
This PR adds support for `%i` operands in the printf function. An
example of a command that works now and didn't before:
```sql
SELECT PRINTF("Decimals: %d %i", 200, 300);
```
This is Just an initial very simple contribution to get my feet wet and
learn the basics about the project and how contributions here work. I
intend to do something more meaningful in next contributions. Probably
will try to finish support for missing `printf` functionality also.
Closes#2615
This PR switches from usage of WAL push to SQL over http calls.
As we have sequence of logical changes from CDC - we can just send SQL
statements to the remote. This will give us benefits of more smooth
concurrent usage of sync - because WAL push is very unfriendly in case
of concurrent usages.
Closes#2617