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

Cleanup mysql_inplace_alter_table()

Removed redundant tdc_remove_table(TDC_RT_REMOVE_ALL). Share was marked
flushed by preceding wait_while_table_is_used() and eventually flushed by
close_all_tables_for_name().

Part of MDEV-17882 - Cleanup refresh version
This commit is contained in:
Sergey Vojtovich
2019-12-20 20:33:29 +04:00
parent 02619ed73b
commit 54c03cb4f0
3 changed files with 20 additions and 4 deletions

View File

@ -7946,10 +7946,8 @@ static bool mysql_inplace_alter_table(THD *thd,
// Rename altered table if requested.
if (alter_ctx->is_table_renamed())
{
// Remove TABLE and TABLE_SHARE for old name from TDC.
tdc_remove_table(thd, TDC_RT_REMOVE_ALL,
alter_ctx->db.str, alter_ctx->table_name.str);
DBUG_ASSERT(!tdc_share_is_cached(thd, alter_ctx->db.str,
alter_ctx->table_name.str));
if (mysql_rename_table(db_type, &alter_ctx->db, &alter_ctx->table_name,
&alter_ctx->new_db, &alter_ctx->new_alias, 0))
{