• V Narayanan's avatar
    Bug#45823 Assertion failure in file row/row0mysql.c line 1386 · 9776b6f9
    V Narayanan authored
    Inserting a negative value in the autoincrement column of a
    partitioned innodb table was causing the value of the auto
    increment counter to wrap around into a very large positive
    value. The consequences are the same as if a very large positive
    value was inserted into a column, e.g. reduced autoincrement
    range, failure to read autoincrement counter.
    
    The current patch ensures that before calculating the next
    auto increment value, the current value is within the positive
    maximum allowed limit.
    
    mysql-test/suite/parts/inc/partition_auto_increment.inc:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Adds tests for performing insert,update and delete on a partition
      table with negative auto_increment values.
    mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Result file for the innodb engine.
    mysql-test/suite/parts/r/partition_auto_increment_memory.result:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Result file for the memory engine.
    mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Result file for the myisam engine.
    mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Result file for the ndb engine.
    mysql-test/suite/parts/t/partition_auto_increment_archive.test:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Adds a variable that allows the Archive engine to skip tests
      that involve insertion of negative auto increment values.
    mysql-test/suite/parts/t/partition_auto_increment_blackhole.test:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Adds a variable that allows the Blackhole engine to skip tests
      that involve insertion of negative auto increment values.
    sql/ha_partition.cc:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Ensures that the current value is lesser than the upper limit
      for the type of the field before setting the next auto increment
      value to be calculated.
    sql/ha_partition.h:
      Bug#45823 Assertion failure in file row/row0mysql.c line 1386
      
      Modifies the set_auto_increment_if_higher function, to take
      into account negative auto increment values when doing a
      comparison.
    9776b6f9
partition_auto_increment_ndb.result 22.3 KB