diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-04 18:44:44 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-04 18:44:44 +0300 |
commit | 5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639 (patch) | |
tree | f0dac9f004764d37c81ef781707163bf105c0bc1 /sql/wsrep_mysqld.cc | |
parent | 938db04898ee9029421f5251751239255dd81c15 (diff) | |
parent | 7f8cd326c68ce15961a84abbc844dfe72aa05a93 (diff) | |
download | mariadb-git-5ff7e68c7eaf2a2daacb0c1ea07b21c8a7bd2639.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 9 |
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); |