summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-09-26 20:49:51 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-28 16:37:06 +0200
commit57e0da50bbef8164635317785b67dd468a908327 (patch)
tree89d1ed179afce8b040c8f2dfcfe179042ff27b2e /sql/sql_trigger.cc
parent7aba6f8f8853acd18d471793f8b72aa1412b8151 (diff)
parentdcbd51cee628d8d8fec9ff5476a6afc855b007aa (diff)
downloadmariadb-git-57e0da50bbef8164635317785b67dd468a908327.tar.gz
Merge branch '10.2' into 10.3
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 755a9a9486d..60eff5ebc88 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -515,7 +515,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);
@@ -543,7 +547,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.str,
tables->table_name.str,
- FALSE)))
+ NULL)))
goto end;
}
else