mySQL auto increment problem: Duplicate entry '4294967295' for key 1
Posted
by Josh
on Stack Overflow
See other posts from Stack Overflow
or by Josh
Published on 2010-03-30T19:18:05Z
Indexed on
2010/03/30
19:23 UTC
Read the original article
Hit count: 723
I have a table of emails.
The last record in there for an auto increment id is 3780, which is a legit record. Any new record I now insert is being inserted right there.
However, in my logs I have the occasional:
Query FAIL: INSERT INTO mail.messages (timestamp_queue) VALUES (:time);
Array
(
[0] => 23000
[1] => 1062
[2] => Duplicate entry '4294967295' for key 1
)
Somehow, the autoincrement jumped up to the INT max of 4294967295
Why on god's green earth would this get jumped up so high? I have no inserts with an id field.
The show status for that table, Auto_increment table now reads: 4294967296
How could something like this occur? I realize the id field should perhaps be a big int, but the worry I have is that somehow this thing jumps back up.
Josh
© Stack Overflow or respective owner