MySQL auto increment ID suddenly jumped to MAXINT, what could be a reason?

前端 未结 2 902
刺人心
刺人心 2021-01-19 07:05

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

2条回答
  •  春和景丽
    2021-01-19 07:32

    One reason for this could be-

    If you entered random numbers in the column of auto increment, then it could be because auto_increment works only in ascending order. So when you inserted the number, which is near to maximum limit, then it reached the maximum limit soon and you couldn't enter anything else.

提交回复
热议问题