we were providing the same damn arguments to `.cell_get()` and
`.cell_get_raw_region()` over and OVER and **OVER** and `O V E R`
Reviewed-by: Preston Thorpe (@PThorpe92)
Closes#2021
The compatibility test suite fails on older versions of TCL, because
they didn't handle characters outside the Basic Multilingual Plane (BMP)
properly. TCL 8.6 fixed this problem ([source](https://wiki.tcl-
lang.org/page/emoji+with+Tcl%2FTk+8.6)).
MacOS comes with an older TCL 8.5.9, so running compatibility tests
locally on the default TCL will give this error:
```
(testing/testing.db) Running test: unicode-emoji
Test FAILED: SELECT unicode('ð ');
returned '240'
expected '128522'
make: *** [test-compat] Error 1
```
This PR adds a target in the Makefile to enforce that TCL 8.6+ is used.
If not, it will fail with a message like this:
```
tclsh 9.0.2 found — need 11.12.13+
make: *** [check-tcl-version] Error 1
```
Closes#2020
Hi
I noticed you have some partner logos in the README nowadays, and felt
left out... But then I realized this is open source and I can just send
a PR. I assume the order is chronological so as Nyrkiö is the oldest of
these three I put it on top. The order could also be reverse
alphabetical.
Closes#2027
We need to return the original function name, not normalized one to be
compatible with SQLite.
Spotted by SQLite TCL tests.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2017
We need to start transaction implicitly in execute() for DML statements
to make sure first transaction is actually started.
Fixes#2002
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#2013
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.
to reproduce this bad behavior:
```sql
create table t(x);
insert into t values (randomblob(1024*1024));
```
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#2000
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.
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.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#2011
This PR brings the error handling of the js bindings one step closer to
better-sqlite3. There is still some work left for the error handling to
be 100% compatible.
This is my first non-trivial Rust PR, so if you have any comments that
can help me improve, please leave them on the PR.
-----
as part of https://github.com/tursodatabase/turso/issues/1900
Reviewed-by: Diego Reis (@el-yawd)
Closes#2009
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.