From ff05b5fd3c964c9b60af26a8db7487773c4ffb13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 23 Nov 2021 21:53:05 +0100 Subject: [PATCH] MYSQL_COM_STATISTICS was displaying wrong number of slow queries In MYSQL_COM_STATISTICS , the number of slow queries was incorrectly set to the number of queries. --- lib/MySQL_Protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 701442a74..19547aca6 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -308,7 +308,7 @@ bool MySQL_Protocol::generate_statistics_response(bool send, void **ptr, unsigne char buf1[1000]; unsigned long long t1=monotonic_time(); - sprintf(buf1,"Uptime: %llu Threads: %d Questions: %llu Slow queries: %llu", (t1-GloVars.global.start_time)/1000/1000, MyHGM->status.client_connections , GloMTH->get_status_variable(st_var_queries,p_th_counter::questions) , GloMTH->get_status_variable(st_var_queries,p_th_counter::slow_queries) ); + sprintf(buf1,"Uptime: %llu Threads: %d Questions: %llu Slow queries: %llu", (t1-GloVars.global.start_time)/1000/1000, MyHGM->status.client_connections , GloMTH->get_status_variable(st_var_queries,p_th_counter::questions) , GloMTH->get_status_variable(st_var_queries_slow,p_th_counter::slow_queries) ); unsigned char statslen=strlen(buf1); mysql_hdr myhdr; myhdr.pkt_id=1;