diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-08 17:15:13 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-08 17:15:13 +0200 |
commit | 50b270525a5d2626c81425890e74d906f5515e89 (patch) | |
tree | 3500af31b2674edd9f9d621f8549b6911ab7cdec /mysql-test/suite/perfschema/r/processlist_reg_user.result | |
parent | 9cbf8ccf2990f9db8d9debee42bc9213cbb04457 (diff) | |
parent | 1d480419822b53c840de54542c1d1a0851dbe2c8 (diff) | |
download | mariadb-git-50b270525a5d2626c81425890e74d906f5515e89.tar.gz |
Merge branch '10.7' into 10.8
Diffstat (limited to 'mysql-test/suite/perfschema/r/processlist_reg_user.result')
-rw-r--r-- | mysql-test/suite/perfschema/r/processlist_reg_user.result | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/processlist_reg_user.result b/mysql-test/suite/perfschema/r/processlist_reg_user.result new file mode 100644 index 00000000000..72e879e4c09 --- /dev/null +++ b/mysql-test/suite/perfschema/r/processlist_reg_user.result @@ -0,0 +1,89 @@ +## +## Test the Performance Schema-based implementation of SHOW PROCESSLIST. +## Verify behavior for regular users and PROCESS_ACL. +## +SELECT @@global.performance_schema_show_processlist INTO @save_processlist; +SET @@global.performance_schema_show_processlist = OFF; +CREATE USER 'regular'@'localhost'; +SHOW GRANTS; +Grants for regular@localhost +GRANT USAGE ON *.* TO 'regular'@'localhost' +SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST; +USER INFO +regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST +SELECT USER, INFO FROM performance_schema.processlist; +USER INFO +regular SELECT USER, INFO FROM performance_schema.processlist +SHOW PROCESSLIST; +SELECT "Previous statement is now completed." as status; +status +Previous statement is now completed. +SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT +FROM performance_schema.events_statements_history +WHERE SQL_TEXT = "SHOW PROCESSLIST"; +EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT +statement/sql/show_processlist SHOW PROCESSLIST 0 +TRUNCATE TABLE performance_schema.events_statements_history; +SET @@global.performance_schema_show_processlist = ON; +SHOW GRANTS; +Grants for regular@localhost +GRANT USAGE ON *.* TO 'regular'@'localhost' +SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST; +USER INFO +regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST +SELECT USER, INFO FROM performance_schema.processlist; +USER INFO +regular SELECT USER, INFO FROM performance_schema.processlist +SHOW PROCESSLIST; +SELECT "Previous statement is now completed." as status; +status +Previous statement is now completed. +SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT +FROM performance_schema.events_statements_history +WHERE SQL_TEXT = "SHOW PROCESSLIST"; +EVENT_NAME SQL_TEXT ROWS_SENT +statement/sql/show_processlist SHOW PROCESSLIST 1 +TRUNCATE TABLE performance_schema.events_statements_history; +GRANT PROCESS ON *.* TO 'regular'@'localhost'; +SET @@global.performance_schema_show_processlist = OFF; +SHOW GRANTS; +Grants for regular@localhost +GRANT PROCESS ON *.* TO 'regular'@'localhost' +SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST; +count(*) >= 2 +1 +SELECT count(*) >= 2 FROM performance_schema.processlist; +count(*) >= 2 +1 +SHOW PROCESSLIST; +SELECT "Previous statement is now completed." as status; +status +Previous statement is now completed. +SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT +FROM performance_schema.events_statements_history +WHERE SQL_TEXT = "SHOW PROCESSLIST"; +EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT +statement/sql/show_processlist SHOW PROCESSLIST 0 +TRUNCATE TABLE performance_schema.events_statements_history; +SET @@global.performance_schema_show_processlist = ON; +SHOW GRANTS; +Grants for regular@localhost +GRANT PROCESS ON *.* TO 'regular'@'localhost' +SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST; +count(*) >= 2 +1 +SELECT count(*) >= 2 FROM performance_schema.processlist; +count(*) >= 2 +1 +SHOW PROCESSLIST; +SELECT "Previous statement is now completed." as status; +status +Previous statement is now completed. +SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2 +FROM performance_schema.events_statements_history +WHERE SQL_TEXT = "SHOW PROCESSLIST"; +EVENT_NAME SQL_TEXT ROWS_SENT >= 2 +statement/sql/show_processlist SHOW PROCESSLIST 1 +TRUNCATE TABLE performance_schema.events_statements_history; +SET @@global.performance_schema_show_processlist = @save_processlist; +DROP USER 'regular'@'localhost'; |