We've been getting the following error recently fairly often (once or twice a day).
Error:
Duplicate entry '5367702' for key 'PRIMARY'
Query:
INSERT INTO myTableName (field1, field2, field3) VALUES (5972, 321, 3127532);
Mysql Version:
5.1.54-rel12.5-log Percona Server on CentOS5.5
Table:
CREATE TABLE `myTableName` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`field1` int(11) DEFAULT NULL,
`field2` int(11) DEFAULT NULL,
`field3` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
I was hoping someone could shed some light into this for us. The PK field is not defined in the insert query, so it should use the next available auto increment value.
Thanks!
Stephen
Error:
Duplicate entry '5367702' for key 'PRIMARY'
Query:
INSERT INTO myTableName (field1, field2, field3) VALUES (5972, 321, 3127532);
Mysql Version:
5.1.54-rel12.5-log Percona Server on CentOS5.5
Table:
CREATE TABLE `myTableName` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`field1` int(11) DEFAULT NULL,
`field2` int(11) DEFAULT NULL,
`field3` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
I was hoping someone could shed some light into this for us. The PK field is not defined in the insert query, so it should use the next available auto increment value.
Thanks!
Stephen
Comment