Commit c6251e36 authored by sjaakola's avatar sjaakola Committed by Jan Lindström

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.
parent 6d783b6a
......@@ -300,8 +300,15 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
if (wsrep_inited == 1)
wsrep_deinit(false);
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider
//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())
{
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment