Thanks for the verification.

After some experiments, I came up with an alternative using
"REPLACE INTO foo (...) SELECT ... UNION ..." to accomplish
the same task, so will use it for now.

 INSERT INTO foo (id, value) SELECT id, value FROM bar
     ON DUPLICATE KEY UPDATE value = value + VALUES(value);

Now, this one errors with with the message

 ERROR 1110 (42000): Column 'value' specified twice

Why is this? Can someone tell me what is happening?

Check http://bugs.mysql.com - there were several bugs in name resolution for INSERT ... SELECT ... ON DUPLICATE KEY UPDATE reported recently, I believe yours is one of those.

-- Taisuke Yamada <[EMAIL PROTECTED]>, http://rakugaki.org/ 2268 E9A2 D4F9 014E F11D 1DF7 DCA3 83BC 78E5 CD3A

Message to my public address may not be handled in a timely manner.
For a direct contact, please use my private address on my namecard.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to