From e065fa5055a2e8c1d68d8769cc85d0add3ad9f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 9 Aug 2015 18:54:23 +0000 Subject: [PATCH] Changes in mysql_servers will automatically trigger a signal_all_threads() --- lib/MySQL_HostGroups_Manager.cpp | 5 ++++- lib/MySQL_Thread.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index d7f6da78a..9a0d7cdc9 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -9,7 +9,7 @@ - +extern MySQL_Threads_Handler *GloMTH; class MySrvConnList; @@ -317,6 +317,9 @@ bool MySQL_HostGroups_Manager::commit() { generate_mysql_servers_table(); wrunlock(); + if (GloMTH) { + GloMTH->signal_all_threads(1); + } return true; } diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 8cdcf6b75..c411b4050 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -1804,6 +1804,7 @@ SQLite3_result * MySQL_Threads_Handler::SQL3_Processlist() { void MySQL_Threads_Handler::signal_all_threads(unsigned char _c) { unsigned int i; unsigned char c=_c; + if (mysql_threads==0) return; for (i=0;ipipefd[1];