summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema/include/processlist_load.inc
blob: 5a14ea17d073c21e9870f77da8742ccbb346a5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ../include/processlist_load.inc
#
# SUMMARY
#
#   Execute PROCESSLIST queries, sorted by user
#
# USAGE
#
#   Example: Using processlist_set.inc to set @@global.performance_schema_show_processlist
#
#   let $pfs_spl = on/off
#   --source ../include/processlist_set.inc
#   --source ../include/processlist_load.inc
#
#   Columns
#   1 <Id> 2 <User> 3 <Host> 4 <db> 5 <Command> 6 <Time> 7 <State> 8 <Info>

# Sort SHOW PROCESSLIST by User instead of Id because Id is not zero-padded
# Unique usernames give best results
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
--sorted_result
SHOW FULL PROCESSLIST;

--echo
--echo # Performance Schema processlist table
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
select * from performance_schema.processlist order by user, id;

--echo
--echo # Information Schema processlist table
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
select * from information_schema.processlist order by user, id;