Commit Graph

10690 Commits

Author SHA1 Message Date
Pekka Enberg
b4efb8bbab Merge 'Fix error handling on provided insert column count mismatch' from Jussi Saurio
Closes #3875

Closes #3907
2025-11-03 13:05:08 +02:00
Jussi Saurio
1c2a8e62ca Fix: return error on provided insert column count mismatch 2025-11-03 11:41:50 +02:00
Pekka Enberg
72edc6d758 Merge 'Clean up Connection::from_uri() by using DatabaseOpts' from Rohith Suresh
Fixes #3900
Migrating the `from_uri` function to use `DatabaseOpts`

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #3901
2025-11-02 16:55:44 +02:00
Pekka Enberg
d35b55d0a4 Merge 'Select correct collation sequence for compound select' from Pedro Muniz
Fixes #3673
We were only considering the right `SelectPlan` for determining the
collation sequence when creating the `EphemeralIndex` for
`CompoundSelect` statements. Now, we pass both the left and the right
plans, and correctly select the collation sequence prioritizing the left
plan collation.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3851
2025-11-02 16:54:58 +02:00
pedrocarlo
0eb0fc5c22 add tests 2025-11-02 11:27:05 -03:00
pedrocarlo
28c52cdf09 pass the left select in compound select to correctly choose the collation sequence 2025-11-02 11:26:48 -03:00
RS2007
60cbc6d8ea migrating from_uri to database opts 2025-11-02 16:28:22 +05:30
Pekka Enberg
a733007228 Merge 'core: Disable autovacuum by default' from Pekka Enberg
People have discovered various bugs in autovacuum so let's disable it by
default for now.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3899
2025-11-02 12:29:03 +02:00
Pekka Enberg
913b7ac600 core: Disable autovacuum by default
People have discovered various bugs in autovacuum so let's disable it by
default for now.
2025-11-02 12:09:21 +02:00
Pekka Enberg
e2271a3ef8 Update README with bug reward cases
Added a list of rewarded cases for bug reports.
2025-11-02 10:46:54 +02:00
Pekka Enberg
a87323855b Merge 'core/vdbe: Fix incorrect unreachable condition in op_seek_rowid' from Preston Thorpe
closes https://github.com/tursodatabase/turso-go/issues/55
In `apply_affinity_char`: we have things like the following:
```rust
    if matches!(value, Value::Blob(_)) {
        return true;
    }
````
Then at the call site in `op_seek_rowid` in execute.rs, we were saying
it was an unreachable condition that a blob was in the register..
```rust
                        let converted = apply_affinity_char(&mut temp_reg, Affinity::Numeric);
                        if converted {
                            match temp_reg.get_value() {
                                Value::Integer(i) => Some(*i),
                                Value::Float(f) => Some(*f as i64),
                                _ => unreachable!(),
                            }
```

Closes #3897
2025-11-02 10:00:10 +02:00
PThorpe92
23496f0bea Fix incorrect unreachable precondition for affinity char in op_seek_rowid 2025-11-01 20:43:44 -04:00
Pekka Enberg
6128ef0afc Merge 'Make mimalloc dependency optional' from Pekka Enberg
Closes #3881
2025-11-01 12:00:08 +02:00
Pekka Enberg
0217588d13 Make mimalloc dependency optional 2025-11-01 11:43:32 +02:00
Pekka Enberg
9336f1c213 Merge 'Update and fix nix build' from Alexander Hirner
This makes `nix build .#turso_cli` succeed.
#835 argueed to remove nix packaging from the repo. I agree and hope
that a talented maintainer will include `turso_cli` in nixpkgs.
Given the currently broken state and the recent Beta release, maybe it's
worth to unbreak it for some last time.

Closes #3879
2025-11-01 11:13:19 +02:00
Pekka Enberg
c091f94de8 Merge 'Fix INSERT UNION ALL' from Duy Dang
Close #3849
Close #3855

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3877
2025-11-01 11:12:38 +02:00
Pekka Enberg
7283f35a29 Merge 'Fix LEFT JOIN subqueries reusing stale right-side values' from Duy Dang
Close #3867

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3874
2025-11-01 11:12:24 +02:00
Pekka Enberg
74d1652a60 Merge 'Throw an error in case duplicate CTE names are found' from Rohith Suresh
* Fixes bug #3674
* With this fix:
```
turso>  WITH t AS (SELECT 1), t AS (SELECT 2) SELECT * FROM x;
  × Parse error: duplicate WITH table name: t
```

Reviewed-by: Preston Thorpe <preston@turso.tech>
Reviewed-by: Mikaël Francoeur (@LeMikaelF)

Closes #3719
2025-11-01 11:12:10 +02:00
ahirner
ef1f359ffc package rename from turso to limbo 2025-11-01 07:16:32 +01:00
ahirner
5d1b8252b4 flake update to nixpkgs ca. 2025-10-12 2025-11-01 07:13:44 +01:00
Duy Dang
e0f6b7cffe Fix INSERT handling for compound VALUES sources 2025-11-01 02:27:42 +07:00
Duy Dang
4b18e3bab5 Fix VALUES UNION ALL register reuse during INSERTs 2025-11-01 02:01:30 +07:00
Duy Dang
3ee47a2c3c Fix LEFT JOIN subqueries reusing stale right-side values 2025-11-01 01:24:31 +07:00
RS2007
bdf720d205 adding regression test for duplicate cte 2025-10-31 23:15:11 +05:30
RS2007
7fff8daaa5 Fixing clippy error 2025-10-31 23:14:08 +05:30
RS2007
1f576593ec adding duplicate cte name checks in planner.rs 2025-10-31 23:14:08 +05:30
Pekka Enberg
41aa49c7b5 Merge 'Fix self-insert SUM when table uses INTEGER PRIMARY KEY' from Duy Dang
Close #3868

Closes #3870
2025-10-31 17:01:22 +02:00
Pekka Enberg
cdd9ec3438 Merge 'bindings/java: Implement setObject(int, Object) in JDBC4PreparedStatement' from Orange banana
## Purpose
* Implement `setObject(int, Object)` to support binding of common Java
types to SQL parameters in JDBC4.
* This implementation currently covers only standard JDBC4 supported
types. LOB and stream bindings are not yet implemented.
## Changes
* Implemented JDBC4PreparedStatement#setObject(int, Object) handling for
  * `String`, `Integer`, `Long`, `Boolean`, `Double`, `Float`, `Byte`,
`Short`
  * `byte[]`, `Date`, `Time`, `Timestamp`, `BigDecimal`
* Added validation for unsupported types (`Blob`, `Clob`, `InputStream`,
`Reader`)
* Added corresponding unit test `testSetObjectCoversAllSupportedTypes`
to verify correctness
## Note
* Additional work (e.g., LOB/Stream handling) will be addressed
separately once driver support is available.
## Related Issue
#615

Reviewed-by: Kim Seon Woo (@seonWKim)

Closes #3864
2025-10-31 17:00:31 +02:00
Pekka Enberg
11f95253a4 Merge 'Update Java package version in scripts/update-version.py' from Pekka Enberg
Closes #3873
2025-10-31 15:59:46 +02:00
Pekka Enberg
8ae49b0dad Add Java badge to README.md 2025-10-31 13:57:33 +02:00
Pekka Enberg
8ee5b5621e Update Java package version in scripts/update-version.py 2025-10-31 13:43:45 +02:00
Orange flavored banana
5fef79d9f6 feat(jdbc): remove unnecessary java.sql prefixes in setObject 2025-10-31 10:38:30 +09:00
Duy Dang
733dc762ed Fix self-insert SUM when table uses INTEGER PRIMARY KEY 2025-10-31 03:34:10 +07:00
Pekka Enberg
331ba14e7c Turso 0.3.0 2025-10-30 18:16:12 +02:00
Pekka Enberg
a4d43d51d4 Update CHANGELOG.md 2025-10-30 18:15:59 +02:00
Pekka Enberg
c91b66ba38 Turso 0.3.0-pre.7 2025-10-30 18:15:14 +02:00
Pekka Enberg
128f2f1ca5 Merge 'Add 'make test-single'' from Jussi Saurio
e.g. `make test-single TEST=subquery.test`
Plus: chmod +x to all tcl tests in testing folder

Closes #3865
2025-10-30 14:19:46 +02:00
Pekka Enberg
43b5ea5363 Merge 'antithesis: Upload config image in GitHub Actions workflow' from Pekka Enberg
The Antithesis config image was not being uploaded during CI runs, only
the workload image. This caused experiment failures when the config
image expired from the registry after 6 months of inactivity.

Closes #3863
2025-10-30 12:57:42 +02:00
Jussi Saurio
7e65657ab0 Add 'make test-single'
e.g. `make test-single TEST=subquery.test`

Plus: chmod +x to all tcl tests in testing folder
2025-10-30 11:38:56 +02:00
Orange flavored banana
4cd007f2eb Test(jdbc): Add coverage for setObject(int, Object) 2025-10-30 15:35:31 +09:00
Pekka Enberg
d71a33a188 antithesis: Upload config image in GitHub Actions workflow
The Antithesis config image was not being uploaded during CI runs, only
the workload image. This caused experiment failures when the config
image expired from the registry after 6 months of inactivity.
2025-10-30 07:49:44 +02:00
Orange flavored banana
53ab453015 Feat(jdbc): Implement setObject(int, Object) in JDBC4PreparedStatement 2025-10-30 09:54:42 +09:00
Pekka Enberg
84a367b00e Merge 'Implement wasNull tracking in ResultSet getter methods' from 김민석
## Summary
Implemented comprehensive wasNull tracking and refactored getter methods
in JDBC4ResultSet to ensure JDBC specification compliance and improve
code maintainability.
### Changes
Added wasNull tracking to all getter methods: Covers primitive types,
objects, dates/times, streams, and BigDecimal
Refactored columnLabel getters to use delegation pattern: Eliminates
code duplication and ensures consistent wasNull behavior
### Bug Fixes & Code Quality
- Fixed getString(String) to return null instead of empty string for
null values
- Added @Nullable annotation to getBytes(String) to fix NullAway error
- Preserved String parsing in getDate(String) for TEXT-formatted dates
- Extracted timezone offset calculation to helper method
### Testing
Added comprehensive tests for wasNull tracking, columnLabel getters,
stream methods, and null handling

Closes #3838
2025-10-29 18:10:42 +02:00
Pekka Enberg
d6f6cb3524 Merge 'perf/throughput: Improve reproducibility' from Pekka Enberg
Improve reproducibility by documenting the steps needed to run the
benchmarks and generate the plots. Also simplify plot generation a bit.

Closes #3843
2025-10-29 18:10:34 +02:00
Pekka Enberg
50ad2f801a Turso 0.3.0-pre.6 2025-10-29 17:54:10 +02:00
Pekka Enberg
eaff2d135f Merge 'Fix database state going back in time after sync' from Nikita Sivukhin
This PR fixes sync engine bug which leads to the state of db going back
in time.
The mistake was made in the pull operation which before fetched
information about last commited changes to the remote separately. This
crates a problem since pull already works with fixed WAL updates
received earlier from remote - and this WAL update can be inconsistent
with more fresh value of last_change_id fetched from remote.
The fix is to use only WAL update and "extract" necessary information
from it. In order to do that sync now read meta sync table while pull
operation is in progress (at the moment when local changes are rolled
back and remote changes already applied) and do not use any external
source to consume that information.
Also, this PR fixes bug in the JS tursodatabase client and reset
statement in the finally block opposed to the previous approach to reset
statement at the beginning. The problem with previous approach were in
cases when client do not fully consumed the statement (e.g. abort
iteration and take only one row) in which case the statement will be
kept active and can prevent another write transaction from starting or
just occupy place as a read transaction.

Closes #3860
2025-10-29 17:53:45 +02:00
Jussi Saurio
79442b3da6 Merge 'translate: disallow correlated subqueries in HAVING and ORDER BY' from Jussi Saurio
These are supported by SQLite, but we cannot handle them correctly yet.

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #3861
2025-10-29 16:05:43 +02:00
Jussi Saurio
6cf2072b51 translate: disallow correlated subqueries in HAVING and ORDER BY
These are supported by SQLite, but we cannot handle them correctly yet.
2025-10-29 15:37:19 +02:00
Nikita Sivukhin
d013876998 cargo fmt 2025-10-29 16:46:51 +04:00
Nikita Sivukhin
9e04687108 add one more test 2025-10-29 16:24:05 +04:00