diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2017-12-12 22:53:38 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-12-13 12:46:33 +0400 |
commit | 159a6c2e608d04732cb678c7691345b9b1dc69b1 (patch) | |
tree | 1e3f015f20b5b84e291ad134e3c8dbb16af31dfc /sql/sql_plugin.h | |
parent | 751e0f6b1ebeddb4faa3437daa399103bb212ac2 (diff) | |
download | mariadb-git-159a6c2e608d04732cb678c7691345b9b1dc69b1.tar.gz |
MDEV-14505 - Threads_running becomes scalability bottleneck
Instead of updating global counter, calculate Threads_running on the fly.
All threads having command != COM_SLEEP are included.
Behaviour changes:
Previously SHOW STATUS and SHOW GLOBAL STATUS returned the same values
representing global status. Now SHOW STATUS always returns 1 indicating that
current session has 1 thread running.
Previously only threads that were executing dispatch_command() or running events
were accounted by Threads_running. Now it is rough equivalent of
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state!='Sleep'
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r-- | sql/sql_plugin.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index f100e8a232a..5903029cd68 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -24,7 +24,8 @@ #define SHOW_always_last SHOW_KEY_CACHE_LONG, \ SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, \ SHOW_HAVE, SHOW_MY_BOOL, SHOW_HA_ROWS, SHOW_SYS, \ - SHOW_LONG_NOFLUSH, SHOW_LONGLONG_STATUS, SHOW_LEX_STRING + SHOW_LONG_NOFLUSH, SHOW_LONGLONG_STATUS, SHOW_UINT32_STATUS, \ + SHOW_LEX_STRING #include "mariadb.h" #undef SHOW_always_last |