From 2b90ca5bea6ea8061b8b8bf64f43837abe3cc94d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Apr 2005 23:14:56 +0300 Subject: [PATCH] Some of the argument place holders were not quite correct compared to the argument type. Fixed also some float() casts to double() as query_id is now actually longlong type. Related to Bug#9646. sql/sql_parse.cc: Some of the argument place holders were not quite correct compared to the argument type. Fixed also some float() casts to double() as query_id is now actually longlong type. --- sql/sql_parse.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 69126e35554..693229c5a24 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1912,12 +1912,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd, #endif ulong uptime = (ulong) (thd->start_time - start_time); sprintf((char*) buff, - "Uptime: %ld Threads: %d Questions: %lu Slow queries: %lu Opens: %ld Flush tables: %ld Open tables: %u Queries per second avg: %.3f", + "Uptime: %lu Threads: %d Questions: %lu Slow queries: %lu Opens: %lu Flush tables: %lu Open tables: %u Queries per second avg: %.3f", uptime, (int) thread_count, (ulong) thd->query_id, (ulong) thd->status_var.long_query_count, thd->status_var.opened_tables, refresh_version, cached_tables(), - uptime ? (float)thd->query_id/(float)uptime : 0); + (uptime ? (ulonglong2double(thd->query_id) / (double) uptime) : + (double) 0)); #ifdef SAFEMALLOC if (sf_malloc_cur_memory) // Using SAFEMALLOC sprintf(strend(buff), " Memory in use: %ldK Max memory used: %ldK",