Skip to content
Permalink
Browse files
MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicating
In 10.3 OR REPLACE trigger option is part of create_info.
  • Loading branch information
Jan Lindström committed Sep 3, 2020
1 parent c3752ce commit 33ae161
Showing 1 changed file with 6 additions and 3 deletions.
@@ -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);

0 comments on commit 33ae161

Please sign in to comment.