1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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_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.
{ 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; goto err_new_table_cleanup;
} }