MW-399 Freeing wsrep_status_vars, before provider is released.
This is needed to clear THD::wsrep_status_vars reference, which would otherwise remain to point to status variable array, which is no more effective.
This commit is contained in:
parent
6d783b6a76
commit
c6251e36fc
@ -300,8 +300,15 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
|
|||||||
if (wsrep_inited == 1)
|
if (wsrep_inited == 1)
|
||||||
wsrep_deinit(false);
|
wsrep_deinit(false);
|
||||||
|
|
||||||
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider
|
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider
|
||||||
//when fails
|
//when fails
|
||||||
|
|
||||||
|
/* provider status variables are allocated in provider library
|
||||||
|
and need to freed here, otherwise a dangling reference to
|
||||||
|
wsrep_status_vars would remain in THD
|
||||||
|
*/
|
||||||
|
wsrep_free_status(thd);
|
||||||
|
|
||||||
if (wsrep_init())
|
if (wsrep_init())
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp);
|
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user