← 输入框|github.com|刷新
Skip to content

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

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

signfff wants to merge 3 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>
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