mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
ALTER TABLE fixes for high-level indexes (iii)
quick_rm_table() expects .frm to exist when it removes high-level indexes. For cases like ALTER TABLE t1 RENAME TO t2, ENGINE=other_engine .frm was removed earlier. Another option would be removing high-level indexes explicitly before the first quick_rm_table() and skipping high-level indexes for subsequent quick_rm_table(NO_FRM_RENAME). But this suggested order may also help with ddl log recovery. That is if we crash before high-level indexes are removed, .frm is going to exist.
This commit is contained in:
committed by
Sergei Golubchik
parent
7aa6bb3aa3
commit
ca17b68bb6
@@ -11931,10 +11931,6 @@ alter_copy:
|
||||
thd->push_internal_handler(&errors_to_warnings);
|
||||
error_handler_pushed=1;
|
||||
|
||||
quick_rm_table(thd, old_db_type, &alter_ctx.db, &backup_name,
|
||||
FN_IS_TMP | (engine_changed ? NO_HA_TABLE | NO_PAR_TABLE: 0));
|
||||
|
||||
debug_crash_here("ddl_log_alter_after_delete_backup");
|
||||
if (engine_changed)
|
||||
{
|
||||
/* the .frm file was removed but not the original table */
|
||||
@@ -11942,6 +11938,11 @@ alter_copy:
|
||||
NO_FRM_RENAME | (engine_changed ? 0 : FN_IS_TMP));
|
||||
}
|
||||
|
||||
debug_crash_here("ddl_log_alter_after_delete_backup");
|
||||
|
||||
quick_rm_table(thd, old_db_type, &alter_ctx.db, &backup_name,
|
||||
FN_IS_TMP | (engine_changed ? NO_HA_TABLE | NO_PAR_TABLE: 0));
|
||||
|
||||
debug_crash_here("ddl_log_alter_after_drop_original_table");
|
||||
if (binlog_as_create_select)
|
||||
{
|
||||
|
Reference in New Issue
Block a user