Due to how `execute` is implemented, it returns a `Connection` clone
which internally shares a turso_core::Connection with every other
Connection. Since `execute` returns `Connection` and immediatly it is
dropped, it will close connection, checkpoint and leave database in
weird state.
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.
Closes#2006
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.
Due to how `execute` is implemented, it returns a `Connection` clone
which internally shares a turso_core::Connection with every other
Connection. Since `execute` returns `Connection` and immediatly it is
dropped, it will close connection, checkpoint and leave database in
weird state.
1. current implementation did not use the custom PartialOrd
implementation for RefValue
2. current implementation did not take collation into account
I don't have a test for this in this PR but it fixes an issue related to
#1757
EDIT:
Okay, it appears the first commit cannot be merged by itself because
since it fixes the incorrect comparison logic, now our UNION tests fail
due to UNIQUE constraint violation (since we are now correctly detecting
duplicates). I have introduced a workaround for this in https://github.c
om/tursodatabase/turso/pull/2001/commits/cb8a576501702cf91713c7f76520501
77318c49c
So, in effect, this PR:
Closes#1757
But, I will make better fixes in #1988 later.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#2001
Now, you can upload driver zar to Datagrip and use Turso database.
<img width="852" alt="image" src="https://github.com/user-
attachments/assets/27b071c3-bef7-4c4a-926d-9225de3c5a5b" />
## How to set up
### Build jar file
command: `make libs && make publish_local`
- this will build and put your jar file under `~/.m2/...`
### Register driver

### Set up datasource

Closes#1971
…ct_plan()
For example, if we attempt to do `max(*)`, let's return the error
message from `resolve_function()` to be compatible with SQLite:
```
sqlite> CREATE TABLE test1(f1, f2);
sqlite> SELECT max(*) FROM test1;
Parse error: wrong number of arguments to function max()
SELECT max(*) FROM test1;
^--- error here
```
Spotted by SQLite TCL tests.
Closes#1990
I added some `reachable` assertions in the
`parallel_driver_generate_transaction` so that Antithesis can log when
we reach them, so it is easier to debug the `page_cache` panic we are
getting there
Closes#1995
This PR implement `get_owned_value` method for `Register` which holds
`ImmutableRecord`. This will be helpful for CDC where `turso-db` will
emit binary record in the before/after columns of CDC table.
Closes#1997
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
For example, if we attempt to do `max(*)`, let's return the error
message from `resolve_function()` to be compatible with SQLite:
```
sqlite> CREATE TABLE test1(f1, f2);
sqlite> SELECT max(*) FROM test1;
Parse error: wrong number of arguments to function max()
SELECT max(*) FROM test1;
^--- error here
```
Spotted by SQLite TCL tests.