Hi Sachin,

On Mon, Nov 28, 2016 at 4:49 AM, Sachin Setiya <sachin.setiya@mariadb.com> wrote:
Hi Nirbhay,

   if (IF_WSREP(thd->wsrep_applier,1))

    {

      plugin_thdvar_init(thd);

    }

This code in commit , breaks log writing on other nodes(In galera) , It sets
the thd->variables to global system variable.
And this

if (wsrep_emulate_bin_log || !(thd->variables.option_bits & OPTION_BIN_LOG))
  DBUG_RETURN(0);

code here make write_transaction_to_binlog() function exit.

This was MDEV-10944. You need to pull the latest 10.1 commits and
possibly cherry-pick the fix to 10.2, in case it has not been up-merged
yet.


I am unable to understand purpose of applying plugin_thdvar_init(thd);
 for wsrep_applier threads.

This is done because the startup wsrep threads (applier, replayer)
are created before some plugin-related variables are initialized.
 
Because this is applied on first thread only and not applied to
remaining threads.

Its only applicable to start-up wsrep threads.

Best,
Nirbhay 
--
Regards
Sachin Setiya
Software Engineer at  MariaDB