Hi,
This is a known bug which will be fixed in MySQL 4.1.11. See
http://bugs.mysql.com/bug.php?id=8675 and http://bugs.mysql.com/bug.php?id=8147
Regards, Jocelyn
Eli wrote:
Hi,
I got this table: +----------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+---------------------+------+-----+---------+-------+ | id | int(10) unsigned | | PRI | 0 | | | value | varchar(128) | YES | | NULL | | +----------+---------------------+------+-----+---------+-------+
I try this query:
INSERT INTO tbl (id,value) (SELECT ref_id,'fixed value' FROM another_tb WHERE id>'100') ON DUPLICATE KEY UPDATE id=id;
but I get the next error: ERROR 1110 (42000): Column 'id' specified twice
When I remove the fields list (id,value), then it works, and as expected the duplicated key rows are not changed.
It doesn't matter if I use INSERT-SELECT or regular SELECT.
Is this a bug?
-thanks, Eli
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]