Skip to content

Instantly share code, notes, and snippets.

@penberg
Created September 29, 2026 06:54
Show Gist options
  • Select an option

  • Save penberg/2e9f653f87a1872efb0bfdd106e8ee8d to your computer and use it in GitHub Desktop.

Select an option

Save penberg/2e9f653f87a1872efb0bfdd106e8ee8d to your computer and use it in GitHub Desktop.
Turso upstream SQLite TCL conformance run (all.test) — 2026-09-29

Turso upstream SQLite TCL conformance run (all.test) — 2026-09-29

Results of running Turso's upstream SQLite TCL conformance suite (sqlite/conformance/upstream/all.test) on September 29, 2026, on main at 1300161c0 ("Add NuGet badge to README.md"). TCL bindings rebuilt from the same commit against a release build of turso_sqlite3, tclsh 9.0.2. Wall-clock: 12.2 minutes.

Summary

  • 325,646 / 340,722 tests passed (95.6%)
  • 208 files fully passing (blessed)
  • 498 known-bad files that ran to their summary (XFAIL)
  • 93 files that stopped on an error outside of a test (XABORT; their tests up to the stop are counted)
  • 9 files that crashed on an engine panic (XCRASH) and 5 that hit the timeout (XHANG); both contained, tests before the death counted
  • 22 files that ran zero tests (EMPTY), every one of them because the file disables itself
  • 10 skipped files: the three meta-runners and the seven fuzz files
  • Run exited clean: no blessed file regressed, no known-bad file went fully green

Compared to the 2026-09-14 report at 7f3c855b2 (321,770 / 341,025, 94.4%):

  • +3,876 more tests passing, 303 fewer tests executing. Almost all of the gain is tkt2686 (3,999 failures → 0). The drop in executed tests is misc7 (−323, its fd-exhaustion loop gets less far before the 30 s timeout), offset by percentile (+22) now running further.
  • Two files blessed: tkt2686, join4. 206 blessed files became 208.
  • One fewer crash: percentile no longer dies on SIGSEGV.
  • Five new wrong-result regressions in outer joins (six tests), confirmed against sqlite3 with the CLI (see below). joinD has 131 more failures than last time and join7 12 more.
  • No change to the abort, hang, empty or skip lists. The 93 aborts are the same files, lines and messages as last time.

What changed between the two runs

303 non-merge commits, most of them MVCC, FTS, storage performance and optimizer (hash-join costing) work that the TCL suite does not see. The ones that show up:

  • core: report SQLITE_FULL without a "Database is full: " prefix (34f13238d) and the DatabaseFull split (2e72fdef4). This is the fix the last report mentioned: tkt2686 goes from 3,999 failures to 0 and is blessed.
  • External aggregate lifetime (2b5c0f3ae keep external aggregate contexts alive while statements use them; 08cf5ba08 finalize external aggregates exactly once). percentile used to die on SIGSEGV after 192 tests; it now runs to the end (214 tests, 86 failures, all feature gaps: WITHIN GROUP, window use of percentile/median, missing wholenumber module).
  • indexexpr1-1910 is fixed. DELETE ... INDEXED BY i1 ... RETURNING * now returns its row. indexexpr1 goes from 33 to 31 failures. This was the single-test engine regression called out in the last three reports.
  • Schema text rebuilding (c1059b420 ON CONFLICT clauses, c5503e2cd DESC on primary keys, 3883621a4 quoted identifiers, a1f761f64 FOREIGN KEY text, c340222f6 GENERATED ALWAYS) and collation fixes (f8c2b435c, 27db14494, a3580b3f9). These do not move any file by more than a couple of tests.
  • Optimizer work (hash-join costing, 2f88cc25e outer-joined loops and WHERE IN, 349608f47 inner filters in subqueries, 9e8928826 correlated comparisons into joins, 4a2ee76d8 deferred hash probes). This window gains a few tests in whereD, join, joinH, whereJ and e_select2, and it contains the regressions below. Which commit introduced them is not identified yet.

New wrong results in outer joins

Each of these was checked with the tursodb CLI at 1300161c0 against sqlite3. They are not plan-shape or error-message differences; Turso returns different rows.

Test Query shape SQLite Turso
joinD-75, joinD-76 t1 JOIN t2 ON t1.b IN (t2.b,-2,-3) ... JOIN t3 ... FULL JOIN t4 ON t1.d=t4.d AND t4.z>0 32 rows 15 rows: every unmatched t4 row is missing
where-20.0 t201 LEFT JOIN t202 ON x=y WHERE ifnull(z,0)>=0 with an index on t202(y, ifnull(z,0)) 0 1
join8-18010 t2 RIGHT JOIN t1 ON true WHERE (x NOTNULL)=a with an index on t1(a) no rows {} 0 0 1: a NULL-extended row for a t1 row that did match
join8-18020 same, plus INNER JOIN t3 ON (x NOTNULL)=a no rows t3value {} 0 0 1
join8-19010 t1 LEFT JOIN t2 ON true INNER JOIN t3 ON (b IS NOT NULL)=0 no rows 10 {} {} 299

where-20.0 and the two join8 tests are old upstream tickets about exactly this: a WHERE term on the NULL-extended side of an outer join being applied at the wrong loop.

Alongside the wrong results, some FULL JOINs that used to be planned now fail to plan. joinD-58, -59, -65, -66 (two INNER JOINs followed by FULL JOIN t4 ON t1.d=t4.d AND t4.z>0) now stop with FULL OUTER JOIN requires an equality condition in the ON clause, even though the ON clause has one. Across the run, FULL OUTER JOIN errors went from 517 to 742 (joinD 201 → 383, join7 71 → 114). In join7 the 31 HashBuild: cursor has no rowid errors from last time are gone and those queries now report the same planning error.

Files that moved

File 2026-09-14 2026-09-29 Why
tkt2686 11,997 / 3,999 11,997 / 0, blessed SQLITE_FULL message without the Database is full: prefix
join4 8 / 3 8 / 0, blessed join4-1.2, -1.4, -1.7 pass (outer join fixes)
percentile 192 / 68, crash 214 / 86, runs to end external aggregate lifetime fixes; the new failures are tests that were never reached before
joinD 1,170 / 795 1,170 / 926 regression: FULL JOIN wrong results and planning errors, above
join7 300 / 205 300 / 217 regression: FULL JOIN planning errors
whereD 61 / 33 61 / 25 OR-clause planning (whereD-1.3, -1.8 to -1.13 and more)
e_select2 46 / 5 46 / 1 four e_select-2.1.1.* join tests pass
index6, tkt2920, join, upfrom1, indexexpr1 −2 each indexexpr1-1910 fixed; join-11.7, join-20.3, upfrom1-4.1, -4.2, index6-7.0, -7.2, tkt2920-1.3, -1.5
whereJ, joinH, window1, sqllimits1 −1 each
where 317 / 39 317 / 41 where-20.0 wrong result (above), where-6.15 sorts where SQLite does not; where-21.1 and where-25.0 fixed
join8 105 / 43 105 / 44 join8-18010, -18020, -19010 wrong results (above); others fixed
whereF 27 / 1 27 / 4 plan shape: Turso now picks a hash join where SQLite expects SCAN t2 ... SEARCH t1
tkt-99378177930f87bd 13 / 2 13 / 4 bytecode shape (EXPLAIN looks for a Function opcode)
tpch01 5 / 1 5 / 3 EQP join order differs from SQLite
where2, subquery +1 each where2-6.7 plan shape; subquery-1.4 returns the same rows in a different order (no ORDER BY)
misc7 1,845 / 1,844 1,522 / 1,521 one test per available fd, machine-dependent
trans2 28 / 17 26 / 16 how far the stress loop gets in 30 s

Everything else is identical to the last run, test for test.

Where the 93 aborts come from

Unchanged from last time: same files, same lines, same messages.

Files Cause
39 Cascade: an earlier failed statement left a table or handle missing (no such table, invalid command name "db2", can't read "STMT"), so a later top-level cleanup fails
19 unable to open database file: 14 multi-connection tests whose second process cannot open the database, 5 files that damage the header on purpose
7 WITHOUT ROWID: CREATE INDEX (3), secondary UNIQUE (3), DELETE (1)
6 Test-only SQL functions or modules: tointeger, counter2, echo, transitive_closure, wholenumber, sqlite_compileoption_used
6 Engine SQL gaps at file top level: parenthesized FROM, MATCH, stored generated columns, PRAGMA encoding=UTF-16 (two files), INSTEAD OF triggers
4 Harness stubs that cannot emulate the real thing: vfs_shmlock, add_test_collate, sqlite3_busy_timeout, test_override_sum
3 pragma_compile_options / sqlite_stat4 tables missing
3 Incremental auto-vacuum not supported
3 No -shm file (Turso keeps the WAL index in memory)
1 e_fkey: DELETE on a child table reports foreign key mismatch where the parent key is a multi-column UNIQUE index
1 select9: a collation registered with db collate is not found when used in an index definition
1 snapshot: database table is locked

Crashes and hangs

Nine files die on the same panics as last time, at the same test counts; only the line numbers moved. percentile (SIGSEGV) is off the list.

File Tests before Panic
corrupt4, corruptJ 7, 2 about to push page twice (core/storage/btree.rs:8727)
corrupt9 4 Freelist leaf page has overflow cells (core/storage/pager.rs:5919)
corruptI 5 slice index out of range (core/types.rs:3156)
rollback2 48 self.current_page >= 0 (core/storage/btree.rs:8840)
altertab, tabfunc01 92, 70 Could not find virtual table for VRollback (core/vdbe/execute.rs:1848)
altertab3 94 table_references needed translating Expr::Column (core/translate/expr/translator.rs:2285)
fkey1 11 bytes[bytes.len() - 1] == bytes[0] (sqlite/parser/src/ast.rs:1261)

The five timeouts are the same five: misc7, trans2, notify2, walsetlk3, walsetlk_recover.

Major remaining issues

Counts are over the per-file logs of this run. Where a number matches the last report, it is the same failures.

FULLSCAN_STEP counter mismatches (1,328, where7 only)

Unchanged. Results match, counters do not (scan 99 vs scan 0 on multi-term OR clauses). Plus 19 × Expression tree is too large (maximum depth 100).

SQL feature gaps

  • RIGHT JOIN after other joins: 910 errors (joinD 514, joinB 268), unchanged
  • FULL OUTER JOIN: 742, up from 517 (joinD 383, joinB 144, join7 114, join9 70); 277 are chaining, the rest the planning error described above
  • Parenthesized FROM-clause subqueries: 434 (joinC 256)
  • WITHOUT ROWID: 398 error lines, without_rowid3 218 of them; conflict2 (129) and without_rowid3 (521) are the big cascades
  • InTable position errors: 115; compound SELECT in WHERE subqueries: 71; ORDER BY inside aggregates: 27
  • EQP output format: 178 mismatches
  • Ordered-set aggregates: WITHIN GROUP for percentile() (24) and median() (7), and window use of extension aggregates, now visible because percentile no longer crashes
  • Test-only functions the suite calls: ieee754 33, sqlite_compileoption_used 25, sqlite_rename_table 19, affinity 16, prefix_length 14; modules: 294, mostly csv (csv01 467/467), then unionvtab 26, swarmvtab 13, echo 11

Missing TCL test commands (291 invalid command name)

Unchanged: 60 are the db-handle cascade; sqlite3_prepare_v3 (49), sqlite3_expired (31), decode_hexdb (25), sqlite3_get_table_printf (24), db2 (12), sqlite3_delete_database (10), utf8_to_utf8 (7).

Engine bugs

  • Outer-join wrong results (new, above): joinD-75/-76, where-20.0, join8-18010/-18020/-19010
  • Corruption handling: damaged files either fail to open (unable to open database file, 19 of them aborts) or panic (four files above) instead of database disk image is malformed (84 expected values say so)
  • A second process cannot open a database (14 multi-connection files)
  • HashBuild: cursor has no rowid: 0, down from 31 in join7; those queries now stop at planning instead
  • TCL can't read variable failures: 195, unchanged (::filename 35, STMT 30, stats(ref) 14, snapshot 14)

Worst files by failure count

File Tests Failures Dominant cause
misc7.test 1,522 1,521 fd-exhaustion loop, killed at 30 s
where7.test 2,026 1,335 FULLSCAN_STEP counter mismatch (scan 99 vs scan 0)
joinD.test 1,170 926 RIGHT/FULL JOIN gaps, plus the new FULL JOIN regressions
without_rowid3.test 1,197 521 WITHOUT ROWID gaps
joinB.test 512 476 RIGHT/FULL JOIN gaps
csv01.test 467 467 csv module missing
sqllimits1.test 489 342 limits not enforced
corruptF.test 268 260 damaged file rejected at open
joinC.test 256 256 parenthesized FROM
wal3.test 345 247 second process cannot open the database (abort)

tkt2686, which topped this table last time with 3,999 failures, is blessed. join7 (300/217), e_walckpt (240/134, abort), conflict2 (139/129) and join9 (150/120) are just below the cut.

Conclusion

The pass rate rose 1.2 points, and nearly all of it is the one-line SQLITE_FULL message fix that the last report found. indexexpr1-1910, the long-standing single-test regression, is fixed, and percentile no longer crashes. The bad news is in outer joins: two weeks of optimizer work brought five confirmed wrong-result regressions (joinD-75/-76, where-20.0, join8-18010/-18020/-19010), where Turso silently returns different rows than SQLite, and FULL JOINs that used to plan now fail with a misleading "requires an equality condition" error. Those should be bisected and fixed before anything else in this report; wrong rows are worse than an error. Every other bucket is the same as last time: RIGHT/FULL JOIN gaps, WITHOUT ROWID, the where7 counters, and corruption handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment