azzazzello
Technical User
greetings,
Something rather strange is happening here...Since server reboot, all the sudden, the following sniplet of code...
is generating the following error
MID is the primary key for the table. There are other keys, but only MID is primary. There IS a '123' MID in the table, but it's supposed to be updated by DUPLICATE KEY line. I have created a table identical to MY_TABLE and tan the same line )twice of course) to see if the problem is manifested there too. It was not - the update took place just fine.
Since the last server reboot, however, the MY_TABLE table cannot be updated using INSERT...ON DUPLICATE KEY UPDATE syntax. It CAN be updated using UPDATE syntax
The table is MyISAM, server version 4.1.15-standard-log. Server is Red Hat Enterprise Linux ES release 4 (Nahant Update 1).
Help?
Something rather strange is happening here...Since server reboot, all the sudden, the following sniplet of code...
Code:
insert into MY_TABLE (MID,PARTNER) values('123','PTR2') ON DUPLICATE KEY UPDATE PARTNER = VALUES(PARTNER);
is generating the following error
Code:
ERROR 1062 (23000): Duplicate entry '123' for key 1
MID is the primary key for the table. There are other keys, but only MID is primary. There IS a '123' MID in the table, but it's supposed to be updated by DUPLICATE KEY line. I have created a table identical to MY_TABLE and tan the same line )twice of course) to see if the problem is manifested there too. It was not - the update took place just fine.
Since the last server reboot, however, the MY_TABLE table cannot be updated using INSERT...ON DUPLICATE KEY UPDATE syntax. It CAN be updated using UPDATE syntax
The table is MyISAM, server version 4.1.15-standard-log. Server is Red Hat Enterprise Linux ES release 4 (Nahant Update 1).
Help?