1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL: minor cleanup in mysql_alter_table()

This commit is contained in:
Eugene Kosov
2017-05-25 15:19:49 +03:00
committed by Aleksey Midenkov
parent 1c8a2de73e
commit 397a891538

View File

@ -9445,13 +9445,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
alter_info->keys_onoff,
&alter_ctx))
{
if (versioned && new_versioned && thd->variables.vers_ddl_survival)
if (table->versioned_by_sql() && new_versioned &&
thd->variables.vers_ddl_survival)
{
if (table->versioned_by_sql())
{
// Failure of this function may result in corruption of an original table.
vers_reset_alter_copy(thd, table);
}
// Failure of this function may result in corruption of an original table.
vers_reset_alter_copy(thd, table);
}
goto err_new_table_cleanup;
}