From 397a891538eab4310b6f45319783a1c5c53977c7 Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Thu, 25 May 2017 15:19:49 +0300 Subject: [PATCH] SQL: minor cleanup in mysql_alter_table() --- sql/sql_table.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index bbfe78ac4b2..a1140b1c6bc 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -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; }