Skip to content

Commit 6801f80

Browse files
committed
MDEV-19457 sys_vars.wsrep_provider_basic failed
wsrep_init_provider_status_variables(): Always set wsrep_inited to ensure that the memory will be freed. The initial patch was provided by Julius Goryavsky.
1 parent 366f4f2 commit 6801f80

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sql/wsrep_mysqld.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ static wsrep::gtid wsrep_server_initial_position()
627627
*/
628628
static void wsrep_init_provider_status_variables()
629629
{
630+
wsrep_inited= 1;
630631
const wsrep::provider& provider=
631632
Wsrep_server_state::instance().provider();
632633
strncpy(provider_name,
@@ -711,9 +712,7 @@ int wsrep_init()
711712
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", err);
712713
}
713714
else
714-
{
715715
wsrep_init_provider_status_variables();
716-
}
717716
return err;
718717
}
719718

@@ -749,7 +748,6 @@ int wsrep_init()
749748
Wsrep_server_state::instance().unload_provider();
750749
return 1;
751750
}
752-
wsrep_inited= 1;
753751

754752
wsrep_init_provider_status_variables();
755753
wsrep_capabilities_export(Wsrep_server_state::instance().provider().capabilities(),

0 commit comments

Comments
 (0)