• Sergey Glukhov's avatar
    Bug#39828 : Autoinc wraps around when offset and increment > 1 · 1faf910e
    Sergey Glukhov authored
    Auto increment value wraps when performing a bulk insert with
    auto_increment_increment and auto_increment_offset greater than
    one.
    The fix:
    If overflow happened then return MAX_ULONGLONG value as an
    indication of overflow and check this before storing the
    value into the field in update_auto_increment().
    
    
    
    mysql-test/r/auto_increment.result:
      test case
    mysql-test/suite/innodb/r/innodb-autoinc.result:
      test case fix
    mysql-test/suite/innodb/t/innodb-autoinc.test:
      test case fix
    mysql-test/suite/innodb_plugin/r/innodb-autoinc.result:
      test case fix
    mysql-test/suite/innodb_plugin/t/innodb-autoinc.test:
      test case fix
    mysql-test/t/auto_increment.test:
      test case
    sql/handler.cc:
      If overflow happened then return MAX_ULONGLONG value as an
      indication of overflow and check this before storing the
      value into the field in update_auto_increment().
    1faf910e
innodb-autoinc.test 22.1 KB