2019-05-26 15:55:14 +02:00
|
|
|
DESC INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
Field Type Null Key Default Extra
|
2021-12-28 14:43:40 +01:00
|
|
|
GROUP_ID int(6) NO NULL
|
|
|
|
CONNECTIONS int(6) NO NULL
|
|
|
|
THREADS int(6) NO NULL
|
|
|
|
ACTIVE_THREADS int(6) NO NULL
|
|
|
|
STANDBY_THREADS int(6) NO NULL
|
|
|
|
QUEUE_LENGTH int(6) NO NULL
|
|
|
|
HAS_LISTENER tinyint(1) NO NULL
|
|
|
|
IS_STALLED tinyint(1) NO NULL
|
2019-05-26 15:55:14 +02:00
|
|
|
SELECT COUNT(*)=@@thread_pool_size FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
COUNT(*)=@@thread_pool_size
|
|
|
|
1
|
|
|
|
SELECT SUM(CONNECTIONS) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
SUM(CONNECTIONS)
|
|
|
|
1
|
|
|
|
SELECT SUM(THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
SUM(THREADS) > 0
|
|
|
|
1
|
|
|
|
SELECT SUM(ACTIVE_THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
SUM(ACTIVE_THREADS) > 0
|
|
|
|
1
|
|
|
|
SELECT SUM(QUEUE_LENGTH) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
SUM(QUEUE_LENGTH)
|
|
|
|
0
|
|
|
|
SELECT SUM(IS_STALLED) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
|
|
|
|
SUM(IS_STALLED)
|
|
|
|
0
|
|
|
|
DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
Field Type Null Key Default Extra
|
2021-12-28 14:43:40 +01:00
|
|
|
GROUP_ID int(6) NO NULL
|
|
|
|
THREAD_CREATIONS bigint(19) NO NULL
|
|
|
|
THREAD_CREATIONS_DUE_TO_STALL bigint(19) NO NULL
|
|
|
|
WAKES bigint(19) NO NULL
|
|
|
|
WAKES_DUE_TO_STALL bigint(19) NO NULL
|
|
|
|
THROTTLES bigint(19) NO NULL
|
|
|
|
STALLS bigint(19) NO NULL
|
|
|
|
POLLS_BY_LISTENER bigint(19) NO NULL
|
|
|
|
POLLS_BY_WORKER bigint(19) NO NULL
|
|
|
|
DEQUEUES_BY_LISTENER bigint(19) NO NULL
|
|
|
|
DEQUEUES_BY_WORKER bigint(19) NO NULL
|
2019-05-26 15:55:14 +02:00
|
|
|
SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) > 0
|
|
|
|
1
|
|
|
|
SELECT SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) > 0
|
|
|
|
1
|
|
|
|
FLUSH THREAD_POOL_STATS;
|
|
|
|
SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER)
|
|
|
|
1
|
2021-08-19 17:54:13 +02:00
|
|
|
SELECT SUM(POLLS_BY_LISTENER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
SUM(POLLS_BY_LISTENER)
|
|
|
|
2
|
|
|
|
SELECT SUM(POLLS_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
|
|
|
|
SUM(POLLS_BY_WORKER)
|
|
|
|
0
|
2019-05-26 15:55:14 +02:00
|
|
|
DESC INFORMATION_SCHEMA.THREAD_POOL_WAITS;
|
|
|
|
Field Type Null Key Default Extra
|
2021-12-28 14:43:40 +01:00
|
|
|
REASON varchar(16) NO NULL
|
|
|
|
COUNT bigint(19) NO NULL
|
2019-05-26 15:55:14 +02:00
|
|
|
SELECT REASON FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS;
|
|
|
|
REASON
|
|
|
|
UNKNOWN
|
|
|
|
SLEEP
|
|
|
|
DISKIO
|
|
|
|
ROW_LOCK
|
|
|
|
GLOBAL_LOCK
|
|
|
|
META_DATA_LOCK
|
|
|
|
TABLE_LOCK
|
|
|
|
USER_LOCK
|
|
|
|
BINLOG
|
|
|
|
GROUP_COMMIT
|
|
|
|
SYNC
|
|
|
|
NET
|
|
|
|
SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
|
|
|
|
COUNT
|
|
|
|
0
|
|
|
|
SELECT SLEEP(0.01);
|
|
|
|
SLEEP(0.01)
|
|
|
|
0
|
|
|
|
SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
|
|
|
|
COUNT
|
|
|
|
1
|
|
|
|
FLUSH THREAD_POOL_WAITS;
|
2021-08-19 17:54:13 +02:00
|
|
|
DESC INFORMATION_SCHEMA.THREAD_POOL_QUEUES;
|
|
|
|
Field Type Null Key Default Extra
|
2021-12-28 14:43:40 +01:00
|
|
|
GROUP_ID int(6) NO NULL
|
|
|
|
POSITION int(6) NO NULL
|
|
|
|
PRIORITY int(1) NO NULL
|
2021-08-19 17:54:13 +02:00
|
|
|
CONNECTION_ID bigint(19) unsigned YES NULL
|
2021-12-28 14:43:40 +01:00
|
|
|
QUEUEING_TIME_MICROSECONDS bigint(19) NO NULL
|
2021-08-19 17:54:13 +02:00
|
|
|
# restart: with restart_parameters
|
|
|
|
connect con1, localhost, root,,test;
|
|
|
|
connection con1;
|
|
|
|
connect con2, localhost, root,,test;
|
|
|
|
connection con2;
|
|
|
|
connect extra_con,127.0.0.1,root,,test,$extra_port,;
|
|
|
|
connection con1;
|
|
|
|
SELECT SLEEP(1000);
|
|
|
|
connection extra_con;
|
|
|
|
connection con2;
|
|
|
|
DO 1;
|
|
|
|
connection extra_con;
|
|
|
|
KILL QUERY con1_id;
|
|
|
|
disconnect extra_con;
|
|
|
|
connection con1;
|
|
|
|
disconnect con1;
|
|
|
|
connection con2;
|
|
|
|
disconnect con2;
|
|
|
|
connection default;
|