mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-23248 Server crashes in mi_extra / ha_partition::loop_extra_alter upon REORGANIZE
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.
This commit is contained in:
@ -7487,11 +7487,11 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_2") ||
|
||||
ERROR_INJECT_ERROR("fail_change_partition_2") ||
|
||||
(close_table_on_failure= TRUE, FALSE) ||
|
||||
write_log_add_change_partition(lpt) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_3") ||
|
||||
ERROR_INJECT_ERROR("fail_change_partition_3") ||
|
||||
mysql_change_partitions(lpt) ||
|
||||
(close_table_on_failure= TRUE, FALSE) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_4") ||
|
||||
ERROR_INJECT_ERROR("fail_change_partition_4") ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
|
||||
|
Reference in New Issue
Block a user