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.
pull/3707/head
René Cannaò 5 years ago
parent 6485d1549d
commit ff05b5fd3c

@ -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;

Loading…
Cancel
Save