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(mysql): improve parsing of INSERT .. SELECT statement #1871

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

@@ -10,7 +10,19 @@ def test_ddl(self):
self.validate_identity("UPDATE items SET items.price = 0 WHERE items.id >= 5 LIMIT 10")
self.validate_identity("DELETE FROM t WHERE a <= 10 LIMIT 10")
self.validate_identity(
"INSERT INTO x VALUES (1, 'a', 2.0) ON DUPLICATE KEY UPDATE SET x.id = 1"
Copy link
Collaborator Author

@georgesittas georgesittas Jun 30, 2023

Choose a reason for hiding this comment

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

This test was added in 5df76cee6 and is invalid in MySQL (tested locally with MySQL version 8). This also checks out with the examples in their documentation page for INSERT ... SELECT. The SET keyword seems to be supported in Postgres, though, so it must've slipped for this reason.

@tobymao tobymao merged commit 8a19d7a into main Jun 30, 2023
@tobymao tobymao deleted the jo/mysql_insert_fixes branch June 30, 2023 20:16
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.

mysql parser not support some INSERT operations
2 participants