• Monty's avatar
    MDEV-23248 Server crashes in mi_extra / ha_partition::loop_extra_alter upon REORGANIZE · 311b7f94
    Monty authored
    This also fixes some issues with
    MDEV-23730 s3.replication_partition 'innodb,mix' segv
    
    The problem was that mysql_change_partitions() closes all handler files
    in case of error, which was not properly reflected in
    fast_alter_partition_table(). This caused handle_alter_part_error() to
    try to close already closed tables, which caused the crash.
    
    Fixed fast_alter_partion_table() to reflect when tables are opened.
    I also fixed that ha_partition::change_partitions() resets m_new_file in
    case of errors.
    Either of the above changes fixes the issue, but both are needed to ensure
    that the code works as expected.
    311b7f94
sql_partition.cc 296 KB