summaryrefslogtreecommitdiff
path: root/sql/wsrep_server_state.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-09-11 13:13:37 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2019-09-12 07:31:17 +0300
commit9bacc9d0c1957650374951637dcfd42cd09c5f5f (patch)
tree2fa61ec2ed3212a7ef77c23b46ecadd10851627c /sql/wsrep_server_state.h
parent5c5452a5a086a9584efb2255059da671fff6e484 (diff)
downloadmariadb-git-9bacc9d0c1957650374951637dcfd42cd09c5f5f.tar.gz
MDEV-20505: Server crash on startup beacuse of bad wsrep configuration
Problem was that if user used bad wsrep configuration we call unireg_abort and in wsrep case there is check to wsrep_server_state that might not yet be initialized. Fixed by checking that wsrep_server_state is initialized before checking it's state. Changes to be committed: modified: sql/mysqld.cc modified: sql/wsrep_server_state.h
Diffstat (limited to 'sql/wsrep_server_state.h')
-rw-r--r--sql/wsrep_server_state.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/wsrep_server_state.h b/sql/wsrep_server_state.h
index 34ff4105180..1ef937300f6 100644
--- a/sql/wsrep_server_state.h
+++ b/sql/wsrep_server_state.h
@@ -35,11 +35,17 @@ public:
const wsrep::gtid& initial_position,
int max_protocol_version);
static void destroy();
+
static Wsrep_server_state& instance()
{
return *m_instance;
}
+ static bool is_inited()
+ {
+ return (m_instance != NULL);
+ }
+
static wsrep::provider& get_provider()
{
return instance().provider();