1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-31957 Concurrent ALTER and ANALYZE collecting statistics can result in stale statistical data

Fixed hang when renaming index to original name
This commit is contained in:
Monty
2023-10-07 17:17:15 +03:00
parent fdcb443e62
commit b159f05a63
3 changed files with 56 additions and 2 deletions

View File

@ -8298,9 +8298,13 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
key_name= rename_key->new_name.str; // New name of current key_info
if (cmp(&rename_key->old_name, &rename_key->new_name))
{
/* Key was renamed */
alter_info->add_stat_rename_index(key_info, &rename_key->new_name,
thd->mem_root);
}
rename_key_it.remove();
alter_info->add_stat_rename_index(key_info, &rename_key->new_name,
thd->mem_root);
/*
If the user has explicitly renamed the key, we should no longer