Commit 5782d2e2 authored by Aleksey Midenkov's avatar Aleksey Midenkov

Fix FK_table_backup removed

Tests affected: innodb-index
parent 6406646a
......@@ -402,6 +402,7 @@ class Alter_table_ctx
*/
FK_share_backup* fk_add_backup(TABLE_SHARE *share)
{
// NB: FK_share_backup ctor is used, ownership is still fk_shares
return fk_ref_backup.emplace(NULL, share, share);
}
bool fk_install_frms();
......
......@@ -8486,6 +8486,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
DBUG_ENTER("mysql_prepare_alter_table");
if (!alter_ctx->fk_add_backup(table->s))
DBUG_RETURN(1);
/*
Merge incompatible changes flag in case of upgrade of a table from an
old MariaDB or MySQL version. This ensures that we don't try to do an
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment