Behavior of AUTO INCREMENT column when max value has reached

I was looking on the net for the query that "What will happen in an InnoDB MySQL table with column of type AUTO INCREMENT if the max value has reached?"

There is so much of information on the net regarding this but does not lead anywhere. I could not find any official word in this query.

Most of the links say that it would throw an error.
Some had other views that the behavior is not predictable
http://www.dbforums.com/mysql/1207954-auto-increment-field-hit-maximum-integer-value.html

So i tried a small test myself through mysqlcc by inserting the largest value in int(11) - AUTO INCREMENT type column (name "id").
Th maximum value i could insert manually was "2147483647" (the next number gives "Out of range value" error)
The moment I inserted a new row, the new number assigned to the column "id" was "1000000000"

Behavior was strange, might help someone that it did not give an error

Comments

Popular posts from this blog

Hibernate: a different object with the same identifier value was already associated with the session

BeanDefinitionStoreException: Failed to parse configuration class: Could not find class [javax.jms.ConnectionFactory]