Commit 33ae1616 authored by Jan Lindström's avatar Jan Lindström

MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicating

In 10.3 OR REPLACE trigger option is part of create_info.
parent c3752cef
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment