1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Sergei Golubchik
2021-07-20 13:00:31 +02:00
parent 1fb71c7831
commit b34cafe9d9
8 changed files with 34 additions and 39 deletions

View File

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