diff options
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r-- | sql/sql_alter.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index cfe360217c2..e413361191d 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -307,16 +307,12 @@ bool Sql_cmd_alter_table::execute(THD *thd) #ifdef WITH_WSREP TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); - if (WSREP(thd) && - (!thd->is_current_stmt_binlog_format_row() || - !find_temporary_table(thd, first_table)) && - wsrep_to_isolation_begin(thd, - lex->name.str ? select_lex->db : NULL, - lex->name.str ? lex->name.str : NULL, - first_table)) + if ((!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, first_table))) { - WSREP_WARN("ALTER TABLE isolation failure"); - DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(((lex->name.str) ? select_lex->db : NULL), + ((lex->name.str) ? lex->name.str : NULL), + first_table); } #endif /* WITH_WSREP */ @@ -329,6 +325,12 @@ bool Sql_cmd_alter_table::execute(THD *thd) lex->ignore); DBUG_RETURN(result); + +#ifdef WITH_WSREP +error: + WSREP_WARN("ALTER TABLE isolation failure"); + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } bool Sql_cmd_discard_import_tablespace::execute(THD *thd) |