Skip to content

ClickHouse, MySQL: Keep the quoting of the CREATE TABLE ENGINE name - #2655

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
engine-name-quoting
Oct 18, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
engine-name-quoting

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

CREATE TABLE t (a INT) ENGINE = "MergeTree" lost its quotes on display and was printed back as ENGINE = MergeTree, and the same happened to ENGINE = `InnoDB`, because the engine name was rebuilt with Ident::new from the bare word value.

Both engines accept a quoted engine name: ClickHouse quotes identifiers with double quotes or backticks (https://clickhouse.com/docs/reference/syntax#identifiers), and MySQL documents that the engine name can be unquoted or quoted (https://dev.mysql.com/doc/refman/8.4/en/create-table.html#create-table-options).

The engine name is now built with Word::into_ident, which keeps the original quote style and the token span.

@LucaCappelletti94 LucaCappelletti94 added bug Something isn't working fuzzer A bug found by the fuzzer labels Oct 17, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.24%. Comparing base (7b5821d) to head (d64869e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2655   +/-   ##
=======================================
  Coverage   81.24%   81.24%           
=======================================
  Files          42       42           
  Lines       33901    33901           
  Branches    33901    33901           
=======================================
  Hits        27543    27543           
  Misses       2792     2792           
  Partials     3566     3566           

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

@s5dsn-eqee s5dsn-eqee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@LucaCappelletti94

LucaCappelletti94 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Merging, thanks @s5dsn-eqee for the review!

cc @alamb

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 63015f5 Oct 18, 2026
13 checks passed
@alamb

alamb commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Thanks @LucaCappelletti94

@alamb
alamb deleted the engine-name-quoting branch October 18, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ClickHouse fuzzer A bug found by the fuzzer MySQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants