From 9eff9ed5c58e782abf383a52a7e691a55b4798a2 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Sun, 24 May 2015 13:30:49 -0400 Subject: [PATCH] MDEV-8208 : Sporadic SEGFAULT on startup During server start, as wsrep initialization happens before plugin_init(), segfault may occur if wsrep THDs try to access the uninitialized maria_hton. --- sql/mysqld.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6bffc8343a1..2008fc54245 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4497,6 +4497,12 @@ will be ignored as the --log-bin option is not defined."); set_ports(); // this is also called in network_init() later but we need // to know mysqld_port now - lp:1071882 #endif /* !EMBEDDED_LIBRARY */ + + /* + Plugin initialization (plugin_init()) hasn't happened yet, set + maria_hton to 0. + */ + maria_hton= 0; wsrep_init_startup(true); } }