Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ff10e0f6
Commit
ff10e0f6
authored
May 26, 2019
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19313 Add test for thread_pool_info
parent
307ca693
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
1 deletion
+133
-1
mysql-test/main/mysqld--help.test
mysql-test/main/mysqld--help.test
+2
-1
mysql-test/main/thread_pool_info.opt
mysql-test/main/thread_pool_info.opt
+1
-0
mysql-test/main/thread_pool_info.result
mysql-test/main/thread_pool_info.result
+89
-0
mysql-test/main/thread_pool_info.test
mysql-test/main/thread_pool_info.test
+41
-0
No files found.
mysql-test/main/mysqld--help.test
View file @
ff10e0f6
...
...
@@ -32,7 +32,8 @@ perl;
connect
null
-
audit
aria
oqgraph
sphinx
thread
-
handling
test
-
sql
-
discovery
query
-
cache
-
info
in
-
predicate
-
conversion
-
threshold
query
-
response
-
time
metadata
-
lock
-
info
locales
unix
-
socket
wsrep
file
-
key
-
management
cracklib
-
password
-
check
user
-
variables
/
;
wsrep
file
-
key
-
management
cracklib
-
password
-
check
user
-
variables
thread
-
pool
-
groups
thread
-
pool
-
queues
thread
-
pool
-
stats
thread
-
pool
-
waits
/
;
# And substitute the content some environment variables with their
# names:
...
...
mysql-test/main/thread_pool_info.opt
0 → 100644
View file @
ff10e0f6
--thread-handling=pool-of-threads --loose-thread-pool-mode=generic --loose-thread-pool-groups=ON --loose-thread-pool-queues=ON --thread-pool-stats=ON --thread-pool-waits=ON
\ No newline at end of file
mysql-test/main/thread_pool_info.result
0 → 100644
View file @
ff10e0f6
DESC INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
Field Type Null Key Default Extra
GROUP_ID int(6) NO 0
CONNECTIONS int(6) NO 0
THREADS int(6) NO 0
ACTIVE_THREADS int(6) NO 0
STANDBY_THREADS int(6) NO 0
QUEUE_LENGTH int(6) NO 0
HAS_LISTENER tinyint(1) NO 0
IS_STALLED tinyint(1) NO 0
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_QUEUES;
Field Type Null Key Default Extra
GROUP_ID int(6) NO 0
POSITION int(6) NO 0
PRIORITY int(1) NO 0
CONNECTION_ID bigint(19) NO 0
QUEUEING_TIME_MICROSECONDS bigint(19) NO 0
DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
Field Type Null Key Default Extra
GROUP_ID int(6) NO 0
THREAD_CREATIONS bigint(19) NO 0
THREAD_CREATIONS_DUE_TO_STALL bigint(19) NO 0
WAKES bigint(19) NO 0
WAKES_DUE_TO_STALL bigint(19) NO 0
THROTTLES bigint(19) NO 0
STALLS bigint(19) NO 0
POLLS_BY_LISTENER bigint(19) NO 0
POLLS_BY_WORKER bigint(19) NO 0
DEQUEUES_BY_LISTENER bigint(19) NO 0
DEQUEUES_BY_WORKER bigint(19) NO 0
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
SELECT SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER)
2
DESC INFORMATION_SCHEMA.THREAD_POOL_WAITS;
Field Type Null Key Default Extra
REASON varchar(16) NO
COUNT bigint(19) NO 0
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;
mysql-test/main/thread_pool_info.test
0 → 100644
View file @
ff10e0f6
source
include
/
not_embedded
.
inc
;
let
$have_plugin
=
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS='ACTIVE' AND PLUGIN_NAME = 'THREAD_POOL_GROUPS'`
;
if
(
!
$have_plugin
)
{
--
skip
Need
thread_pool_groups
plugin
}
#I_S.THREAD_POOL_GROUPS
DESC
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
COUNT
(
*
)
=@@
thread_pool_size
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
SUM
(
CONNECTIONS
)
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
SUM
(
THREADS
)
>
0
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
SUM
(
ACTIVE_THREADS
)
>
0
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
SUM
(
QUEUE_LENGTH
)
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
SELECT
SUM
(
IS_STALLED
)
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_GROUPS
;
# I_S.THREAD_POOL_QUEUES
DESC
INFORMATION_SCHEMA
.
THREAD_POOL_QUEUES
;
#Todo - figure out how to populate queue with debug test
# I_S.THREAD_POOL_STATS
DESC
INFORMATION_SCHEMA
.
THREAD_POOL_STATS
;
# The following query does not reliably give results, after FLUSH
# so if the test runs with --repeat, it would fail
#SELECT SUM(THREAD_CREATIONS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
SELECT
SUM
(
DEQUEUES_BY_LISTENER
+
DEQUEUES_BY_WORKER
)
>
0
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_STATS
;
SELECT
SUM
(
POLLS_BY_LISTENER
+
POLLS_BY_WORKER
)
>
0
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_STATS
;
--
disable_ps_protocol
FLUSH
THREAD_POOL_STATS
;
SELECT
SUM
(
DEQUEUES_BY_LISTENER
+
DEQUEUES_BY_WORKER
)
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_STATS
;
SELECT
SUM
(
POLLS_BY_LISTENER
+
POLLS_BY_WORKER
)
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_STATS
;
--
enable_ps_protocol
#I_S.THREAD_POOL_WAITS
DESC
INFORMATION_SCHEMA
.
THREAD_POOL_WAITS
;
SELECT
REASON
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_WAITS
;
SELECT
COUNT
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_WAITS
WHERE
REASON
=
'Sleep'
;
SELECT
SLEEP
(
0.01
);
SELECT
COUNT
FROM
INFORMATION_SCHEMA
.
THREAD_POOL_WAITS
WHERE
REASON
=
'Sleep'
;
FLUSH
THREAD_POOL_WAITS
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment