diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-09-30 18:06:15 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-09-30 18:06:15 -0400 |
commit | 9a57de86beda0032a6dd9f804822e2651eb869bf (patch) | |
tree | 7c1b645c0f4e4392c3c47da46f4c5d08b0c28a86 /sql/sql_alter.cc | |
parent | c916085e271cd049537b1e07b36cd060c44750bd (diff) | |
download | mariadb-git-9a57de86beda0032a6dd9f804822e2651eb869bf.tar.gz |
bzr merge -r4123..4144 codership/5.6
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r-- | sql/sql_alter.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index 8b4f4ab9963..a39f07ae35d 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -308,16 +308,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 */ result= mysql_alter_table(thd, select_lex->db, lex->name.str, @@ -328,9 +324,13 @@ bool Sql_cmd_alter_table::execute(THD *thd) select_lex->order_list.first, lex->ignore); + DBUG_RETURN(result); + #ifdef WITH_WSREP +error: + WSREP_WARN("ALTER TABLE isolation failure"); + DBUG_RETURN(TRUE); #endif /* WITH_WSREP */ - DBUG_RETURN(result); } bool Sql_cmd_discard_import_tablespace::execute(THD *thd) |