← Back to team overview

maria-developers team mailing list archive

Re: 8ffded0: MDEV-9312: storage engine not enforced during galera cluster replication

 

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 security@xxxxxxxxxxx