summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-04 18:44:44 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-04 18:44:44 +0300
commit5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639 (patch)
treef0dac9f004764d37c81ef781707163bf105c0bc1 /sql/wsrep_mysqld.cc
parent938db04898ee9029421f5251751239255dd81c15 (diff)
parent7f8cd326c68ce15961a84abbc844dfe72aa05a93 (diff)
downloadmariadb-git-5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index d0155f27d6d..ae664e951b5 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2867,7 +2867,14 @@ int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
definer_host.length= 0;
}
- stmt_query.append(STRING_WITH_LEN("CREATE "));
+ const LEX_CSTRING command[2]=
+ {{ C_STRING_WITH_LEN("CREATE ") },
+ { C_STRING_WITH_LEN("CREATE OR REPLACE ") }};
+
+ if (thd->lex->create_info.or_replace())
+ stmt_query.append(command[1]);
+ else
+ stmt_query.append(command[0]);
append_definer(thd, &stmt_query, &definer_user, &definer_host);