看数据库的sql_mode参数如何设置的,一般默认不报错你可以试试插入大于这个数的值是什么情况

解决方案 »

  1.   

      开发文档Use the smallest integer data type for the AUTO_INCREMENT column that is large enough to hold the
    maximum sequence value you will need. When the column reaches the upper limit of the data type, the
    next attempt to generate a sequence number fails. Use the UNSIGNED attribute if possible to allow a
    greater range. 
      

  2.   

    2楼英明,UNSIGNED 翻一倍,四十亿估计是够了
      

  3.   

    会出错。但 bigint 需要用多久才能用完呢? 不妨计算一下
      

  4.   

    这个不需要关心吧?
    参考下:innodb_autoinc_lock_mode
    内存上的一个mutex非常轻量级