Bug #66540 Redundant coding in ON DUPLICATE KEY UPDATE
Submitted: 25 Aug 2012 20:04 Modified: 22 Jan 2013 13:26
Reporter: Wojciech Winogrodzki Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[25 Aug 2012 20:04] Wojciech Winogrodzki
Description:
Why do you make me list the column names twice? I've already done it in INSERT statement. Just update the columns except those that form the primary key.

INSERT INTO zzz (a,x)
VALUES (1, 100)
ON DUPLICATE KEY UPDATE x=100;

can be simply:

INSERT INTO zzz (a,x)
VALUES (1, 100)
ON DUPLICATE KEY UPDATE;

Imagine, I have 27 column names to be copied, pasted and assigned right now.

How to repeat:
n/a

Suggested fix:
ON DUPLICATE KEY UPDATE;
[22 Dec 2012 13:26] MySQL Verification Team
Maybe this would work better for you ?
REPLACE INTO zzz (a,x) VALUES (1, 100)
[23 Jan 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".