Skip to content

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

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
tokenizer-prefix-after-period
Open

LucaCappelletti94 wants to merge 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.32%. Comparing base (3330dc9) to head (4879487).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2688   +/-   ##
=======================================
  Coverage   81.31%   81.32%           
=======================================
  Files          42       42           
  Lines       33977    33990   +13     
  Branches    33977    33990   +13     
=======================================
+ Hits        27628    27641   +13     
  Misses       2785     2785           
  Partials     3564     3564           

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

2 participants