diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-24 15:32:48 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-24 15:32:48 -0400 |
commit | 1b7c5dedf7266d73c9c402cefee681251aea1e18 (patch) | |
tree | d7c3fa1354ea4c991a95042eff29a9873e9f8015 /sql/sql_class.cc | |
parent | f381ad5230e0537c63ad721d39aab1681e0a213a (diff) | |
download | mariadb-git-1b7c5dedf7266d73c9c402cefee681251aea1e18.tar.gz |
MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
In galera cluster, the definer (and thus binlog invoker) must be set
for CREATE ROLE before Query_log_event is created during TOI on the
originating node.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 37bacc986f7..76f8b98c55e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5249,7 +5249,11 @@ void THD::get_definer(LEX_USER *definer, bool role) { binlog_invoker(role); #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) +#ifdef WITH_WSREP + if ((wsrep_applier || slave_thread) && has_invoker()) +#else if (slave_thread && has_invoker()) +#endif { definer->user = invoker_user; definer->host= invoker_host; |