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

can use status w/o quotes for insert statement #85

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

max-hoffman
Copy link

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing, think update needs the same patch

@@ -2639,6 +2639,10 @@ func TestKeywords(t *testing.T) {
}, {
input: "select /* unused keywords as cols */ write, virtual from t where trailing = 'foo'",
output: "select /* unused keywords as cols */ `write`, `virtual` from t where `trailing` = 'foo'",
}, {
input: "insert into x (status) values (42)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test for update and delete too, bet one of them has the same issue.

Also you or Vinai should expand the reserved word test you wrote to include updates, deletes, inserts

Comment on lines 2646 to 2647
input: "insert into x (status) values (42)",
output: "insert into x(`status`) values (42)",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete duplicate

go/vt/sqlparser/sql.y Show resolved Hide resolved
@VinaiRachakonda VinaiRachakonda merged commit a8845fb into main Oct 13, 2021
@Hydrocharged Hydrocharged deleted the max/insert_status branch October 13, 2022 12:55
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.

3 participants