summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
commit28f08d3753eb10a1393a63e6c581d43aad9f93b9 (patch)
tree86c9df8c3fb6d4ebd99d431697c84f06ef242989 /sql/sql_trigger.cc
parent38665893087e20c3ad65d5b0e227a75185a4865e (diff)
parentf1bcfbb4373e40dda2c18c137f76fc6ff32e1a45 (diff)
downloadmariadb-git-28f08d3753eb10a1393a63e6c581d43aad9f93b9.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 01ceb34a577..ba4a2725ced 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -514,7 +514,11 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
if (err_status)
goto end;
}
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
+
+#ifdef WITH_WSREP
+ if (thd->wsrep_exec_mode == LOCAL_STATE)
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
+#endif
/* We should have only one table in table list. */
DBUG_ASSERT(tables->next_global == 0);
@@ -542,7 +546,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
/* Under LOCK TABLES we must only accept write locked tables. */
if (!(tables->table= find_table_for_mdl_upgrade(thd, tables->db,
tables->table_name,
- FALSE)))
+ NULL)))
goto end;
}
else