mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
mysql-5.7.39
This commit is contained in:
39
mysql-test/suite/perfschema/include/processlist_load.inc
Normal file
39
mysql-test/suite/perfschema/include/processlist_load.inc
Normal file
@ -0,0 +1,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;
|
||||
|
17
mysql-test/suite/perfschema/include/processlist_set.inc
Normal file
17
mysql-test/suite/perfschema/include/processlist_set.inc
Normal file
@ -0,0 +1,17 @@
|
||||
# ../include/processlist_set.inc
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Set the value of performance_schema_show_proceslist then
|
||||
# wait for the operation to complete
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# let $pfs_spl = on;
|
||||
# --source ../include/processlist_set.inc
|
||||
|
||||
eval set @@global.performance_schema_show_processlist = $pfs_spl;
|
||||
|
||||
let $wait_condition = show variables where variable_name like '%show_processlist%' and value = '$pfs_spl';
|
||||
--source include/wait_condition.inc
|
||||
|
Reference in New Issue
Block a user