• unknown's avatar
    Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server · 675d0941
    unknown authored
    Problem: getting an autoincrement value for a partition table in the ::info() method we call
    the get_auto_increment() for all partitions. That may cause a problem for at least MyISAM
    tables that rely on some table state (in this particular case table->naxt_nuber_field is 
    set to 0 in the mysql_insert() and we get a crash). 
    Moreover, calling get_auto_increment() is superfluous there.
    
    Fix: use ::info(HA_STATUS_AUTO) calls to get autoincrement values for partitions instead of
    get_auto_increment() ones in the ha_partition::info().
    
    
    mysql-test/r/partition.result:
      Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
        - test result.
    mysql-test/t/partition.test:
      Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
        - test case.
    sql/ha_partition.cc:
      Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
        - use info(HA_STATUS_AUTO) calls to get autoincrement values for partitions,
          set the auto_increment_value as the biggest one.
    675d0941
partition.result 40.2 KB