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

insert ... on duplicate key update has some bug #1066

Closed
maxiaoguang64 opened this issue Jul 30, 2018 · 5 comments
Closed

insert ... on duplicate key update has some bug #1066

maxiaoguang64 opened this issue Jul 30, 2018 · 5 comments
Assignees

Comments

@maxiaoguang64
Copy link
Collaborator

sql like that insert into table(id, name) values (1, ?)on duplicate key update name = ?
when parameter after on duplicate key update that has some bug

@terrymanu
Copy link
Member

Is any relationship of this issue and #1105? @AIKiller

@maxiaoguang64
Copy link
Collaborator Author

maxiaoguang64 commented Aug 8, 2018

I won't to fix after careful consideration
l don't think it possible that use placeholder in update clause
usually, we use insert ... update like this
1、insert into table (name, version) values (?, ?) on duplicate key update version = version + 1
2、insert into table (name) values (?), (?) on duplicate key update version = values(name)

@victormferrara
Copy link
Contributor

Hi! Just FYI it is possible to use the placeholder in the update clause but as you say the common usage is just to use the values keyword or similar.

Cheers!

@giantoneday
Copy link

您好,我也遇到了相同的问题,insert on duplicate key update是一个非常重要的功能,尤其是对于后台的增删改查来说。请看下能否支持? 谢谢。 
Hello, I came across the same problem, "insert on duplicate key update" is an important feature in MySQL, especially for some admin operations. I sincerely hope that sharding-jdbc can support it, thanks very much.

@terrymanu
Copy link
Member

For English only, other languages will not accept.

@apache apache locked and limited conversation to collaborators Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants