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

Add backticks for ON DUPLICATE statement in MySQL adapter #33

Merged
merged 3 commits into from
Jun 27, 2018

Conversation

mberlanda
Copy link
Collaborator

A database I am working on gave me the 1064 MYSQL error due to the usage of some restricted keywords:

https://dev.mysql.com/doc/refman/8.0/en/keywords.html

When tested in the client:

-- original generated query
INSERT INTO `users` (`id`, `admin`)
VALUES (123, 0)
ON DUPLICATE KEY UPDATE admin = VALUES(admin);

-- corrected working query
INSERT INTO `users` (`id`, `admin`)
VALUES (123, 0)
ON DUPLICATE KEY UPDATE `admin` = VALUES(`admin`);

@jamis jamis merged commit 91b1a5b into jamis:master Jun 27, 2018
@jamis
Copy link
Owner

jamis commented Jun 27, 2018

Thank you!

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.

2 participants