MySQL duplicate entry error when no duplicate exists?

Try setting the key higher and retry the insert ALTER TABLE AcpConfig AUTO_INCREMENT = 1 Apparently this will reset the next auto_increment to be the next highest available value.

Try setting the key higher and retry the insert. ALTER TABLE AcpConfig AUTO_INCREMENT = 1; Apparently this will reset the next auto_increment to be the next highest available value.

Awesome suggestion; I was wondering how to do this exact thing, so this is a good reference. However, as I say in my own answer below the problem turned out to be fixed by a REPAIR TABLE statement, so I'm not sure whether this would have itself fixed things. Thanks anyway.

– Eli Courtwright Jul 23 '09 at 14:28.

Apparently the table was corrupted. I ran CHECK TABLE and saw some corruption errors and then ran REPAIR TABLE and it seemed to work; afterward my INSERTS started working again. Mysql> check table AcpConfig; +---------------+-------+----------+----------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +---------------+-------+----------+----------------------------------------------------------+ | acp.

AcpConfig | check | warning | 8 clients are using or havent closed the table properly | | acp. AcpConfig | check | warning | Size of datafile is: 32079848 Should be: 32079784 | | acp. AcpConfig | check | error | Found 495762 keys of 495761 | | acp.

AcpConfig | check | error | Corrupt | +---------------+-------+----------+----------------------------------------------------------+ 4 rows in set (3.50 sec) mysql> repair table AcpConfig; +---------------+--------+----------+----------------------------------------------+ | Table | Op | Msg_type | Msg_text | +---------------+--------+----------+----------------------------------------------+ | acp. AcpConfig | repair | warning | Number of rows changed from 495761 to 495762 | | acp. AcpConfig | repair | status | OK | +---------------+--------+----------+----------------------------------------------+ 2 rows in set (13.14 sec).

1 I am guessing REPAIR TABLE fixed your sequence numbers as well – northpole Jul 23 '09 at 14:28.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions