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

Constraint names and database names with spaces. #7745

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

GuptaManan100
Copy link
Member

@GuptaManan100 GuptaManan100 commented Mar 25, 2021

Description

Running a query like

ALTER TABLE `Post With Space` DROP FOREIGN KEY `Post With Space_ibfk_1`

got rewritten to

ALTER TABLE `Post With Space` DROP FOREIGN KEY Post With Space_ibfk_1

by the parser. This issue arises because the name field was stored as a string rather than a ColIdent. Similar issues were also there in the database name fields. This PR addresses this issue.

After the changes, there is 1 extra shift-reduce conflict that has arisen. It has been verified that MySQL also has the shift reduce conflict and Vitess's behaviour emulates what MySQL does.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Signed-off-by: GuptaManan100 <[email protected]>
@harshit-gangal harshit-gangal merged commit ee5cb86 into vitessio:master Mar 26, 2021
@harshit-gangal harshit-gangal deleted the constraint-name branch March 26, 2021 05:38
@askdba askdba added this to the v10.0 milestone Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constraint Names with Spaces do not work with Vitess
3 participants