Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(parser): don't consume identifier in unnamed constraint parser #2377

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

georgesittas
Copy link
Collaborator

@georgesittas georgesittas commented Oct 5, 2023

Fixes #2376

TL;DR the issue is that MySQL overrides the SCHEMA_UNNAMED_CONSTRAINTS and adds KEY to it, so the `key` identifier's text unfortunately matches that and we eagerly consume it as an unnamed constraint even though we shouldn't.

Not sure if this is the correct approach.. I also thought about not matching identifiers in _match_texts but that's a change with a bigger impact and I wanted to discuss about it first.

cc @tobymao what do you think?

@tobymao tobymao merged commit dd8334d into main Oct 5, 2023
@tobymao tobymao deleted the jo/unnamed_constraint_fix branch October 5, 2023 16:19
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.

Parsing columns with reserved names
2 participants