Hi, Nirbhay!

On Sep 24, Nirbhay Choubey wrote:
> diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
> index 60248f3..99b3311 100644
> --- a/sql/sql_plugin.cc
> +++ b/sql/sql_plugin.cc
> @@ -3116,7 +3118,12 @@ void plugin_thdvar_init(THD *thd)
>    thd->variables.dynamic_variables_size= 0;
>    thd->variables.dynamic_variables_ptr= 0;
>  
> -  if (IF_WSREP((!WSREP(thd) || !thd->wsrep_applier),1))
> +  /*
> +    The following initializations are deferred for some wsrep system threads
> +    created during startup as they could be created even before LOCK_plugin
> +    and plugins are initialized.
> +  */
> +  if (IF_WSREP((plugins_are_initialized),1))

why do you need that? I think you can safely call plugin_thdvar_init()
twice, so you don't really need to skip the first invocation.

It's that principle that the one reponsible for the problem should pay
for it, others shouldn't suffer :)

In ha_maria:implicit_commit, it was Aria's hack, and that if() was added
inside Aria. Here is purely wsrep problem, putting an if() on a common
code path for all threads looks just wrong.

>    {
>      mysql_mutex_lock(&LOCK_plugin);
>      thd->variables.table_plugin=

Regards,
Sergei
Chief Architect MariaDB
and [email protected]

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to