summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-07-20 13:00:31 +0200
committerSergei Golubchik <serg@mariadb.org>2021-07-24 12:37:50 +0200
commitb34cafe9d9fb6029d7aa6c5c18ef51c577aa637a (patch)
tree1ec97d6d4e27d2bdb26ece4059d7926d2924812b /sql/sql_parse.cc
parent1fb71c7831c9d8d216873e48ca106ca38a4e975b (diff)
downloadmariadb-git-b34cafe9d9fb6029d7aa6c5c18ef51c577aa637a.tar.gz
cleanup: move thread_count to THD_count::value()
because the name was misleading, it counts not threads, but THDs, and as THD_count is the only way to increment/decrement it, it could as well be declared inside THD_count.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index e12817d231c..3cccca9b786 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2232,15 +2232,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
size_t length=
#endif
my_snprintf(buff, buff_len - 1,
- "Uptime: %lu Threads: %d Questions: %lu "
+ "Uptime: %lu Threads: %u Questions: %lu "
"Slow queries: %lu Opens: %lu Flush tables: %lld "
"Open tables: %u Queries per second avg: %u.%03u",
- uptime,
- (int) thread_count, (ulong) thd->query_id,
+ uptime, THD_count::value(), (ulong) thd->query_id,
current_global_status_var->long_query_count,
current_global_status_var->opened_tables,
- tdc_refresh_version(),
- tc_records(),
+ tdc_refresh_version(), tc_records(),
(uint) (queries_per_second1000 / 1000),
(uint) (queries_per_second1000 % 1000));
#ifdef EMBEDDED_LIBRARY