summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-04-21 21:45:19 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-04-21 21:45:19 -0400
commit1950457c14646b108bec1fadb40b75440c3a3d41 (patch)
tree34b05e356960e79d14206453c0593aafa0f5dbbe /sql/sql_alter.cc
parentb981c7a927f4a3721b4753d5fa73b966bf2eef96 (diff)
downloadmariadb-git-1950457c14646b108bec1fadb40b75440c3a3d41.tar.gz
MDEV#6148 main.flush_read_lock fails due to conflicting
read lock TOI was being attempted even when WSREP_ON was not enabled (off). So, with FTWRL in place TOI later gets aborted & thus the failure. Fixed by adding a check to skip TOI if wsrep is not enabled.
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 75d27016317..0b4636c1f0f 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -102,8 +102,9 @@ bool Alter_table_statement::execute(THD *thd)
#ifdef WITH_WSREP
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
- if (!thd->is_current_stmt_binlog_format_row() ||
- !find_temporary_table(thd, first_table))
+ if (WSREP(thd) &&
+ (!thd->is_current_stmt_binlog_format_row() ||
+ !find_temporary_table(thd, first_table)))
{
if (wsrep_to_isolation_begin(thd,
lex->name.str ? select_lex->db : NULL,