Currently indexes are the bulk of the problem with `UPDATE` and
`DELETE`, while we work on fixing those it makes sense to disable
indexing since they are not stable. We want to try to make everything
else stable before we continue with indexing.
There is a small hack in Tcl tests where we check `if {[info exists
::env(SQLITE_EXEC)] && $::env(SQLITE_EXEC) eq "scripts/limbo-
sqlite3-index-experimental"} {`
to ensure we run those tests only with the script index-experimental.
Closes#1758
Currently indexes are the bulk of the problem with `UPDATE` and
`DELETE`, while we work on fixing those it makes sense to disable
indexing since they are not stable. We want to try to make everything
else stable before we continue with indexing.
It looks like its possible to have sqlite3 persisted between runs
somehow, let's make sure we overwrite it.
Context:
```
Prepare all required actions
Run ./.github/shared/install_sqlite
Run curl -o /tmp/sqlite.zip
https://sqlite.org/$YEAR/sqlite-tools-linux-x64-$SQLITE_VERSION.zip >
/dev/null
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
2 3292k 2 98304 0 0 326k 0 0:00:10 --:--:-- 0:00:10
326k
100 3292k 100 3292k 0 0 6686k 0 --:--:-- --:--:-- --:--:--
6678k
replace /usr/local/bin/sqlite3? [y]es, [n]o, [A]ll, [N]one, [r]ename:
NULL
(EOF or read error, treating as "[N]one" ...)
Archive: /tmp/sqlite.zip
Error: Process completed with exit code 1.
```
Closes#1766
It looks like its possible to have sqlite3 persisted between runs
somehow, let's make sure we overwrite it.
Context:
```
Prepare all required actions
Run ./.github/shared/install_sqlite
Run curl -o /tmp/sqlite.zip
https://sqlite.org/$YEAR/sqlite-tools-linux-x64-$SQLITE_VERSION.zip >
/dev/null
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
2 3292k 2 98304 0 0 326k 0 0:00:10 --:--:-- 0:00:10
326k
100 3292k 100 3292k 0 0 6686k 0 --:--:-- --:--:-- --:--:--
6678k
replace /usr/local/bin/sqlite3? [y]es, [n]o, [A]ll, [N]one, [r]ename:
NULL
(EOF or read error, treating as "[N]one" ...)
Archive: /tmp/sqlite.zip
Error: Process completed with exit code 1.
```
Hey 👋
I admire the work that you guys are doing here, great job so far!
`Value::Blob::encode_hex` incorrectly does a lossy conversion of the
blob's underlying byte vector into a utf8 String, incorrectly displaying
the underlying hex in the process.
This PR fixes issue #1751Closes#1759
By encoding a Vec<u8> (vector of bytes), a lossy conversion from a
`Vec<u8>` to a `String` occurs. The lossy conversion leads to an
incorrect hex value to be displayed.
Avoid the lossy conversion and let the `hex` crate do its thing.
- `Update` query doesn't update `n_changes`. Let's make it work
- Add `InsertFlags` to add meta information related to insert operations
- For update query, add `UPDATE` flag
- Currently, the update query executes `Insn::Delete` and `Insn::Insert`
internally, it increases `n_change` by 2. So, for the update query,
let's skip increasing `n_change` for the `Insn::Insert`
https://github.com/tursodatabase/limbo/issues/1681
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#1683
This PR adds support for the instruction `IntegrityCk` which performs an
integrity check on the contents of a single table. Next PR I will try to
implement the rest of the integrity check where we would check indexes
containt correct amount of data and some more.
<img width="1151" alt="image" src="https://github.com/user-
attachments/assets/29d54148-55ba-480f-b972-e38587f0a483" />
Closes#1719
Wrap the `sqlite3` object members with a mutex like SQLite does to make
it thread-safe. Note that as future work we should make the threading
model configurable as per SQLite.
Closes#1748
Accidentally found that you can quit SQLite CLI just by typing `.q`,
`.qu` and `.qui` instead of full `.quit`.
IMO this will be an improvement to the DX.
I've also found bunch of other dot commands that work with abbreviated
aliases in SQLite. If this PR is okay then I will also add them here.
Closes#1720
Hey everyone! I think this project is really really cool and I am here
to answer @jussisaurio
[call](https://x.com/jussisaur/status/1930290889496129562).
I started tinkering around with limbo and ran into this panic. Any input
with less than 7 characters (`"explain".len()`) will trigger it. In my
case it was `show;`. The issue was introduced a week ago in #1678.
PS: As I [said on X](https://x.com/nilskch/status/1930362930605723818),
I would love to help you with Limbo. I have a lot of experience with
DSLs and LSPs, and I have recently become interested in databases. I
don't have much experience with databases yet, but I am happy to learn.
I see that you have a lot of stuff going on with DSLs at the moment, so
I would be productive straight away in that area. Happy to chat if you
need help :)
Closes#1730
This is more in line with SQLite:
```sql
sqlite> insert into t values (randomblob(1024*1024 * 6));
Parse error: no such table: t
```
Reviewed-by: Preston Thorpe (@PThorpe92)
Closes#1744