Skip to content

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

Open
LucaCappelletti94 wants to merge 4 commits into
mainfrom
upstream/sqlite-table-options-list
Open

LucaCappelletti94 wants to merge 4 commits into
mainfrom
upstream/sqlite-table-options-list

Conversation

@LucaCappelletti94

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 Sep 24, 2026
@codecov-commenter

codecov-commenter commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.05%. Comparing base (88ffee6) to head (414cebd).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
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.05%   +0.03%     
==========================================
  Files          42       42              
  Lines       33436    33616     +180     
  Branches    33436    33616     +180     
==========================================
+ Hits        27090    27247     +157     
- Misses       2789     2800      +11     
- Partials     3557     3569      +12     

☔ 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
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

2 participants