From ed28d986e97a0e7b22b58de2ceaaee9e8416634f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 7 Feb 2018 17:56:15 +0200 Subject: [PATCH 1/2] Fix debug assertion when no master is present If no master is present, the debug assertion would dereference a NULL pointer. --- server/modules/monitor/mariadbmon/mysql_mon.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/monitor/mariadbmon/mysql_mon.cc b/server/modules/monitor/mariadbmon/mysql_mon.cc index 51586f3db..0c83bf942 100644 --- a/server/modules/monitor/mariadbmon/mysql_mon.cc +++ b/server/modules/monitor/mariadbmon/mysql_mon.cc @@ -2372,7 +2372,7 @@ monitorMain(void *arg) } } - ss_dassert(handle->master == root_master); + ss_dassert(root_master == NULL || handle->master == root_master); ss_dassert(!root_master || ((root_master->server->status & (SERVER_SLAVE | SERVER_MASTER)) != (SERVER_SLAVE | SERVER_MASTER))); From a6fc2d3f88a7801d8cbe3655a532f04645638e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 8 Feb 2018 13:40:11 +0200 Subject: [PATCH 2/2] Add missing header load_utils.cc used std::string without including the header. --- server/core/load_utils.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/server/core/load_utils.cc b/server/core/load_utils.cc index d21522e0c..1f34b49e1 100644 --- a/server/core/load_utils.cc +++ b/server/core/load_utils.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include #include