What happens when I exhaust a bigint generated key? How to handle it?

前端 未结 4 1296
夕颜
夕颜 2020-12-03 01:37

I can\'t imagine for myself a good answer for this, so I thought of asking it here. In my mind, I\'m always wondering what will happen if the AUTO INCREMENT PRIMARY ID

4条回答
  •  一个人的身影
    2020-12-03 02:14

    Once Autoincrement hit the limit for the field size, INSERTs will generate an error.

    In practical you will get the following type of error:

    ERROR 1467 (HY000): Failed to read auto-increment value from storage engine
    

    For more info visit:

    http://dev.mysql.com/doc/refman/5.1/en/example-auto-increment.html

提交回复
热议问题