From d322635dc6a116cd73a035b7b7f8ad911d485e65 Mon Sep 17 00:00:00 2001 From: Andrei Ismail Date: Tue, 18 Aug 2015 14:36:29 +0300 Subject: [PATCH] #333 Improve refresh query matching in order to show realtime results for SHOW PROCESSLIST --- lib/ProxySQL_Admin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index deff3d469..15d125fcf 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -874,7 +874,11 @@ void ProxySQL_Admin::GenericRefreshStatistics(const char *query_no_space, unsign bool stats_mysql_query_digest_reset=false; bool dump_global_variables=false; - if (strstr(query_no_space,"stats_mysql_processlist")) + if (strcasestr(query_no_space,"processlist")) + // This will match the following usecases: + // SHOW PROCESSLIST + // SHOW FULL PROCESSLIST + // SELECT * FROM stats_mysql_processlist { stats_mysql_processlist=true; refresh=true; } if (strstr(query_no_space,"stats_mysql_query_digest")) { stats_mysql_query_digest=true; refresh=true; }