diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-28 16:40:12 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-28 16:40:12 +0300 |
commit | c710c450e3a5654244fffaabcb4ba5af2dd24dd9 (patch) | |
tree | 3a1cc44386b812c80dab56945eea5b8034553713 /sql/wsrep_mysqld.cc | |
parent | df07ea0b27f891c69e60b75869f474cd03232216 (diff) | |
download | mariadb-git-c710c450e3a5654244fffaabcb4ba5af2dd24dd9.tar.gz |
MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicating
While doing TOI buffer OR REPLACE option was not added to replicated
string.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index f95ef168a23..d392d1c2a61 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2924,7 +2924,12 @@ static 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_STRING command[3]= + {{ C_STRING_WITH_LEN("CREATE ") }, + { C_STRING_WITH_LEN("ALTER ") }, + { C_STRING_WITH_LEN("CREATE OR REPLACE ") }}; + stmt_query.append(command[thd->lex->create_view_mode].str, + command[thd->lex->create_view_mode].length); append_definer(thd, &stmt_query, &definer_user, &definer_host); |