summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-06 18:50:25 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-06 18:50:25 +0300
commitb3e395a13ee7e9df323cb654d18dc81ff2f3fd1e (patch)
tree6078ccc55d5298796c3f626fb4886a131b833e37 /sql/sql_trigger.cc
parente14ffd85d09a62d098d3db9597fd34bf3d4c4fe3 (diff)
parent187b9c924ebaff8f02fb4e2139a01fd1512e3dc9 (diff)
downloadmariadb-git-b3e395a13ee7e9df323cb654d18dc81ff2f3fd1e.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 26ec04cb89e..247055d397c 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -34,6 +34,9 @@
#include "sql_handler.h" // mysql_ha_rm_tables
#include "sp_cache.h" // sp_invalidate_cache
#include <mysys_err.h>
+#ifdef WITH_WSREP
+#include "debug_sync.h"
+#endif /* WITH_WSREP */
LEX_CSTRING *make_lex_string(LEX_CSTRING *lex_str,
const char* str, size_t length,
@@ -518,7 +521,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
#ifdef WITH_WSREP
if (thd->wsrep_exec_mode == LOCAL_STATE)
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, tables);
#endif
/* We should have only one table in table list. */
@@ -580,6 +583,16 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
goto end;
}
+#ifdef WITH_WSREP
+ DBUG_EXECUTE_IF("sync.mdev_20225",
+ {
+ const char act[]=
+ "now "
+ "wait_for signal.mdev_20225_continue";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+#endif /* WITH_WSREP */
result= (create ?
table->triggers->create_trigger(thd, tables, &stmt_query):
table->triggers->drop_trigger(thd, tables, &stmt_query));