⚡ Sangsakala Proxy 🏠 Home
Skip to content

sqlite3: expect a generated column loop at CREATE TABLE - #1373

Open
signfff wants to merge 2 commits into
sqlancer:mainfrom
signfff:generated-column-loop
Open

signfff wants to merge 2 commits into
sqlancer:mainfrom
signfff:generated-column-loop

Conversation

@signfff

@signfff signfff commented Oct 20, 2026

Copy link
Copy Markdown

Fixes #1369.

A CREATE TABLE whose generated columns depend on each other has failed immediately with generated column loop on "..." since SQLite 3.44.0 (check-in af527231c), but SQLite3TableGenerator.createTableStatement did not list that message among its expected errors, so SQLancer raised an AssertionError and lost the thread — a false alarm on SQLancer's side.

This PR:

  • adds generated column loop to the expected errors of createTableStatement;
  • keeps SQLite3Provider.checkTablesForGeneratedColumnLoops for pre-3.44 SQLite, where the table is created and the loop only surfaces on first use;
  • adds TestSQLite3GeneratedColumnLoop, which replays the statement from the 2026-10-05 run that triggered this; the test fails without the fix and passes with it.

@mrigger as discussed in the issue.

🤖 Generated with Claude Code

Since SQLite 3.44.0 (check-in af527231c, 2023-10-13) a CREATE TABLE whose
generated columns depend on each other fails at once; before, the table
was created and the loop surfaced on first use, which is the only place
SQLite3Provider.checkTablesForGeneratedColumnLoops expects it. Generated
columns are on by default since upstream sqlancer#1238 (2025-06), so the table
generator could hit an AssertionError on any current sqlite-jdbc: the
2026-10-05 trunk run lost a thread to it. The new test fails without the
change on that run's statement.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@signfff

signfff commented Oct 23, 2026

Copy link
Copy Markdown
Author

CI note: the three failing jobs (Citus, Presto, TiDB QPG) are pre-existing flakiness unrelated to this PR — the same jobs fail on main's own runs with the same signature (expected: <0> but was: <-1> after ~301s; the dockerized DB never becomes ready in time). E.g. run 39349907567 (2026-10-20) on main failed TiDB + Citus + SQLite, and 39349289518 (2026-10-20) failed TiDB + DataFusion + YugabyteDB. The SQLite job passes here.

I merged the latest main and pushed; the new run (39973562773) is waiting for workflow approval. @mrigger

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQLite: AssertionError on CREATE TABLE with a generated column loop (SQLite ≥ 3.44)

1 participant