diff options
author | Marc Alff <marc.alff@oracle.com> | 2011-06-29 10:15:05 +0200 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2011-06-29 10:15:05 +0200 |
commit | 6f1decbf7736a42b8eb08ac6c05bd300cc9df1d3 (patch) | |
tree | 180b012ec531719537e3db1840848a3be3f38c4a /sql/sql_parse.cc | |
parent | 8c988dc61b92e0dffcf1158175acd7326b9df08a (diff) | |
download | mariadb-git-6f1decbf7736a42b8eb08ac6c05bd300cc9df1d3.tar.gz |
Bug#12565712 - 61205: "QUERIES PER SECOND AVG" VALUE IN STATUS OUTPUT IS INCORRECT
Before this fix, a server executing 1009 queries in 1000 seconds would give a status of:
Queries per second avg: 1.9
The printf format used to print the decimal part, computed separately, is incorrect.
With this fix, the correct result is printed:
Queries per second avg: 1.009
Tested manually, no test case provided.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 36fdf376fa6..885db292699 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1308,7 +1308,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, length= my_snprintf(buff, buff_len - 1, "Uptime: %lu Threads: %d Questions: %lu " "Slow queries: %lu Opens: %lu Flush tables: %lu " - "Open tables: %u Queries per second avg: %u.%u", + "Open tables: %u Queries per second avg: %u.%03u", uptime, (int) thread_count, (ulong) thd->query_id, current_global_status_var.long_query_count, |