@@ -4629,13 +4629,11 @@ const char* find_fk_supporting_index(Alter_info *alter_info,
46294629 problems with duplicate foreign key names while we have two
46304630 definitions of the same table.
46314631
4632- @param thd Thread handle.
46334632 @param table_def Table object.
46344633 @param alter_ctx ALTER TABLE runtime context.
46354634 */
46364635
4637- static void restore_foreign_key_names (THD *thd,
4638- dd::Table *table_def,
4636+ static void restore_foreign_key_names (dd::Table *table_def,
46394637 const Alter_table_ctx &alter_ctx)
46404638{
46414639 // Restore the original name for pre-existing foreign keys
@@ -8739,7 +8737,7 @@ static bool mysql_inplace_alter_table(THD *thd,
87398737 table definition. Since we now have only one defintion, the names
87408738 can be restored.
87418739 */
8742- restore_foreign_key_names (thd, altered_table_def, *alter_ctx);
8740+ restore_foreign_key_names (altered_table_def, *alter_ctx);
87438741
87448742 if (thd->dd_client ()->update (altered_table_def))
87458743 goto cleanup2;
@@ -11941,7 +11939,7 @@ bool mysql_alter_table(THD *thd, const char *new_db, const char *new_name,
1194111939 goto err_with_mdl;
1194211940 DBUG_ASSERT (new_table != nullptr );
1194311941
11944- restore_foreign_key_names (thd, new_table, alter_ctx);
11942+ restore_foreign_key_names (new_table, alter_ctx);
1194511943 if (thd->dd_client ()->update (new_table))
1194611944 goto err_with_mdl;
1194711945
0 commit comments