Skip to content

fix(mysql): handle spaced qualified identifiers - #108

Open
Areson wants to merge 2 commits into
DataDog:mainfrom
Areson:Areson/mysql-qualified-identifiers
Open

fix(mysql): handle spaced qualified identifiers#108
Areson wants to merge 2 commits into
DataDog:mainfrom
Areson:Areson/mysql-qualified-identifiers

Conversation

@Areson

@Areson Areson commented Aug 13, 2026

Copy link
Copy Markdown

Why

MySQL digest text can add whitespace around dots in qualified identifiers. The lexer currently splits these names into separate tokens, preventing normalized SQL and table metadata from containing the complete identifier.

What

  • Join whitespace-separated MySQL identifier components into a single qualified identifier
  • Support quoted, partially quoted, keyword-named, Unicode, and wildcard components
  • Preserve existing token behavior for unquoted calls and quoted identifiers
  • Add regression coverage using a performance_schema digest-shaped query and long-identifier benchmarks

Risk Assessment

Low — the behavior is gated to MySQL and only changes qualified names containing whitespace around a dot. Other DBMS behavior and ordinary MySQL allocation costs remain unchanged.

Validation

  • Go 1.25.7 unit tests, race detector, and vet
  • Both fuzz targets for 60 seconds
  • golangci-lint v2.9.0
  • Targeted benchmarks confirm linear scaling and no ordinary-query allocation regression

References

Areson and others added 2 commits August 13, 2026 15:32
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
@Areson
Areson marked this pull request as ready for review August 13, 2026 23:14
@Areson
Areson requested a review from a team as a code owner August 13, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalized MySQL Queries Are Not Parsed Properly

1 participant