summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2020-09-03 14:10:42 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2020-09-03 14:10:42 +0300
commit33ae1616e01b564d03c507769564d37c582783cf (patch)
tree6ba01fee754236dd3965347c773cd03f6d1ea288 /sql/wsrep_mysqld.cc
parentc3752cef3c34589ea95a7ab66cff3dd5b11290d5 (diff)
downloadmariadb-git-33ae1616e01b564d03c507769564d37c582783cf.tar.gz
MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicating
In 10.3 OR REPLACE trigger option is part of create_info.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 20f2cd99edd..de234770788 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2900,11 +2900,14 @@ static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
definer_host.length= 0;
}
- const LEX_CSTRING command[3]=
+ const LEX_CSTRING command[2]=
{{ 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]);
+
+ 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);