Skip to content

SQLite: Support comma-separated WITHOUT ROWID and STRICT table options - #2575

Merged
alamb merged 3 commits into
mainfrom
upstream/sqlite-table-options-list
Oct 16, 2026
Merged

alamb merged 3 commits into
mainfrom
upstream/sqlite-table-options-list

Conversation

@LucaCappelletti94

@LucaCappelletti94 LucaCappelletti94 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

SQLite ends CREATE TABLE with a comma-separated list of table options, WITHOUT ROWID and STRICT, in any order and optionally preceded by a comma (SQLite docs).

The parser read the two keywords at unrelated points of the statement, so CREATE TABLE a (id INTEGER PRIMARY KEY) WITHOUT ROWID, STRICT, its reverse and (...), STRICT failed to parse. The one spelling it accepted, WITHOUT ROWID STRICT, is one SQLite refuses, and a table with both options rendered back to it.

The without_rowid and strict flags on CreateTable become one sqlite_table_options field holding the options in source order and whether a comma precedes them. Output therefore matches input, which matters because SQLite stores that text verbatim in sqlite_schema. The comma-less spelling now fails as it does in SQLite. #208 and #898 added each option on its own.

@LucaCappelletti94 LucaCappelletti94 changed the title Upstream/sqlite table options list SQLite: Support comma-separated WITHOUT ROWID and STRICT table options Sep 24, 2026
@codecov-commenter

codecov-commenter commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.21%. Comparing base (88ffee6) to head (e45f605).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
src/parser/mod.rs 62.50% 0 Missing and 9 partials ⚠️
src/ast/ddl.rs 85.71% 1 Missing and 1 partial ⚠️
src/ast/spans.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2575      +/-   ##
==========================================
+ Coverage   81.02%   81.21%   +0.19%     
==========================================
  Files          42       42              
  Lines       33436    33921     +485     
  Branches    33436    33921     +485     
==========================================
+ Hits        27090    27550     +460     
- Misses       2789     2797       +8     
- Partials     3557     3574      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review September 24, 2026 22:03
@LucaCappelletti94 LucaCappelletti94 added the bug Something isn't working label Sep 24, 2026
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/sqlite-table-options-list branch from 414cebd to d43d31a Compare October 2, 2026 16:14
@LucaCappelletti94 LucaCappelletti94 added the waiting on reviewer PR needs to be reviewed label Oct 3, 2026
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

@alamb I am tagging you as a reviewer in this specific one because it is stuck for a few weeks without review and I will be needing this one downstream.

@alamb

alamb commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Thanks @LucaCappelletti94

@alamb
alamb added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 942f36a Oct 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working SQLite waiting on reviewer PR needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants