-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'merge-perfschema-5.7' into 10.5
- Loading branch information
Showing
308 changed files
with
4,683 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Skip the test if 'query cache' is disabled. | ||
# Note : There are 2 techniques to disable query cache : | ||
# (1) Set query_cache_type to 0 or OFF | ||
# (2) Set query_cache_size to 0 | ||
|
||
disable_query_log; | ||
|
||
let $do_skip=0; | ||
|
||
let $qc_var_1= query_get_value("SELECT COUNT(*) AS var1 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'have_query_cache' AND variable_value = 'YES'", var1, 1); | ||
if ($qc_var_1 == 1) | ||
{ | ||
let $do_skip=1; | ||
} | ||
|
||
# Check if 'query_cache_type' is OFF | ||
let $qc_var_2= query_get_value("SELECT COUNT(*) AS var2 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_type' AND VARIABLE_VALUE = 'OFF'", var2, 1); | ||
if ($qc_var_2 == 1) | ||
{ | ||
let $do_skip=0; | ||
} | ||
|
||
# Check if 'query_cache_size' is 0 | ||
let $qc_var_3= query_get_value("SELECT COUNT(*) AS var3 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_size' AND VARIABLE_VALUE = 0", var3, 1); | ||
|
||
if ($qc_var_3 == 1) | ||
{ | ||
let $do_skip=0; | ||
} | ||
|
||
if ($do_skip) | ||
{ | ||
skip Query Cache enabled, skipping test; | ||
} | ||
|
||
enable_query_log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
select @@global.performance_schema_show_processlist into @save_processlist; | ||
set @@global.performance_schema_show_processlist = 'on'; | ||
alter table performance_schema.processlist | ||
add column foo integer; | ||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema' | ||
truncate table performance_schema.processlist; | ||
ERROR HY000: Invalid performance_schema usage. | ||
alter table performance_schema.processlist | ||
add index test_index(info); | ||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema' | ||
create unique index test_index | ||
on performance_schema.processlist(host); | ||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema' | ||
drop index `PRIMARY` | ||
on performance_schema.processlist; | ||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema' | ||
CREATE TABLE test.create_select | ||
AS SELECT * from performance_schema.processlist; | ||
DROP TABLE test.create_select; | ||
set @@global.performance_schema_show_processlist = @save_processlist; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
select @@global.performance_schema_show_processlist into @save_processlist; | ||
set @@global.performance_schema_show_processlist = 'on'; | ||
select * from performance_schema.processlist | ||
where user like 'event_scheduler'; | ||
select * from performance_schema.processlist | ||
where user = 'FOO'; | ||
insert into performance_schema.processlist | ||
values (12, 'foo', 'bar', 'test', null, 1000, 'state', 'info'); | ||
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'processlist' | ||
update performance_schema.processlist | ||
set id=12, user='foo'; | ||
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'processlist' | ||
delete from performance_schema.processlist | ||
where id <> 99; | ||
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist' | ||
delete from performance_schema.processlist; | ||
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist' | ||
LOCK TABLES performance_schema.processlist READ; | ||
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist' | ||
UNLOCK TABLES; | ||
LOCK TABLES performance_schema.processlist WRITE; | ||
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist' | ||
UNLOCK TABLES; | ||
set @@global.performance_schema_show_processlist = @save_processlist; |
Oops, something went wrong.