summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-06 16:14:23 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-06 16:14:23 +0100
commit8e7649867f23ef4fca5ddb6678a66e414026ef7b (patch)
treeff7649743a3bf13ea13eb80f1126a13cd756d335 /sql/sql_alter.cc
parentf9448bcb2153aac614ecb260a4dd7f27b04f17a2 (diff)
parent7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8 (diff)
downloadmariadb-git-8e7649867f23ef4fca5ddb6678a66e414026ef7b.tar.gz
Merge 10.0-galera into 10.1
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc20
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)