Commit 397a8915 authored by Eugene Kosov's avatar Eugene Kosov Committed by Aleksey Midenkov

SQL: minor cleanup in mysql_alter_table()

parent 1c8a2de7
...@@ -9445,14 +9445,12 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -9445,14 +9445,12 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
alter_info->keys_onoff, alter_info->keys_onoff,
&alter_ctx)) &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. // Failure of this function may result in corruption of an original table.
vers_reset_alter_copy(thd, table); vers_reset_alter_copy(thd, table);
} }
}
goto err_new_table_cleanup; goto err_new_table_cleanup;
} }
} }
......
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