title: MySQL auto increment ID suddenly jumped to MAXINT, what could be a reason?
body: <p>I have a mysql table with about 2,000,000 entries, with a primary key which is auto incrementing. However, at one point the auto increment value suddenly jumped from what it was (around 2,000,000) to maximum integer value (2,147,483,647). Needless to say all subsequent insertions into this table failed. When I noticed it, I changed primary key type from int to bigint and so it works fine for now.</p>
  
  <p>So my question is, why could this have happened? And are there any precautions which I could take to avoid this from happening in the future?</p>