• Sergei Golubchik's avatar
    MDEV-13097 Online alter of a partitioned MyISAM table with auto_increment · 3f240bff
    Sergei Golubchik authored
    MyISAM only allows online alter if autoincrement didn't change.
    MyISAM detects that by comparing new autoinc value from create_info,
    with the old one, stored in MYI. But in partitioned tables,
    create_info->auto_increment_value is for the whole table, max of
    autoinc values of individual MYI partitions. So *some* MYI partitions
    will inevitably think that alter table changes auto_increment value
    and will deny online alter.
    
    Fix: only compare autoinc values, if the user has used AUTO_INCREMENT
    in the ALTER TABLE statement.
    3f240bff
ha_myisam.cc 81.5 KB