Skip to content

MySQL: Keep literal prefixes as identifiers after a period - #2688

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
tokenizer-prefix-after-period
Oct 21, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
tokenizer-prefix-after-period

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

MySQL accepts SELECT t.x'ff' FROM t as column x with alias ff, and similarly accepts qualified columns named b and n. The tokenizer recognizes a prefixed literal after the period, so these queries fail to parse. Qualified-name rules are documented by MySQL and MariaDB.

Dialect::supports_literal_prefix_in_qualified_name() enables identifier tokenization immediately after a period for MySQL and the generic dialect. Whitespace or comments after the period retain literal tokenization, as do unqualified prefixes. Other dialects retain their literal handling.

@LucaCappelletti94 LucaCappelletti94 added bug Something isn't working MySQL labels Oct 19, 2026
@codecov-commenter

codecov-commenter commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.53%. Comparing base (424378c) to head (ccfdce0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2688   +/-   ##
=======================================
  Coverage   81.52%   81.53%           
=======================================
  Files          42       42           
  Lines       34205    34218   +13     
  Branches    34205    34218   +13     
=======================================
+ Hits        27885    27898   +13     
  Misses       2770     2770           
  Partials     3550     3550           

☔ 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 force-pushed the tokenizer-prefix-after-period branch from bb91320 to 4879487 Compare October 20, 2026 10:49
@LucaCappelletti94
LucaCappelletti94 force-pushed the tokenizer-prefix-after-period branch from 4879487 to ccfdce0 Compare October 21, 2026 07:47
@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit d9eec6e Oct 21, 2026
12 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 MySQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants