summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r/privilege.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/r/privilege.result')
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result
index 1f806d94991..09d32a177fd 100644
--- a/mysql-test/suite/perfschema/r/privilege.result
+++ b/mysql-test/suite/perfschema/r/privilege.result
@@ -214,6 +214,7 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+connect con1, localhost, pfs_user_1, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_1'@'localhost' to database 'performance_schema'
@@ -312,6 +313,8 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+disconnect con1;
+connect con2, localhost, pfs_user_2, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_2'@'localhost' to database 'performance_schema'
@@ -410,6 +413,8 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+disconnect con2;
+connect con3, localhost, pfs_user_3, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_3'@'localhost' to database 'performance_schema'
@@ -504,6 +509,8 @@ SELECT "can select" FROM performance_schema.events_waits_summary_by_instance LIM
ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_summary_by_instance'
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'file_summary_by_instance'
+disconnect con3;
+connection default;
revoke all privileges, grant option from 'pfs_user_1'@localhost;
revoke all privileges, grant option from 'pfs_user_2'@localhost;
revoke all privileges, grant option from 'pfs_user_3'@localhost;
@@ -514,10 +521,12 @@ flush privileges;
# Test cases from WL#4818
# Setup user
CREATE user pfs_user_4;
+connect pfs_user_4, localhost, pfs_user_4, , ;
#
# WL#4818, NFS4: Normal user does not have access to view data
# without grants
#
+connection pfs_user_4;
# Select as pfs_user_4 should fail without grant
SELECT event_id FROM performance_schema.events_waits_history;
ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history'
@@ -533,6 +542,7 @@ ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'f
# WL#4818, NFS3: Normal user does not have access to change what is
# instrumented without grants
#
+connection pfs_user_4;
# User pfs_user_4 should not be allowed to tweak instrumentation without
# explicit grant
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
@@ -555,6 +565,7 @@ ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'eve
# WL#4814, NFS1: Can use grants to give normal user access
# to turn on and off instrumentation
#
+connection default;
# Grant access to change tables with the root account
GRANT UPDATE ON performance_schema.setup_consumers TO pfs_user_4;
GRANT UPDATE, SELECT ON performance_schema.setup_timers TO pfs_user_4;
@@ -562,6 +573,7 @@ GRANT UPDATE, SELECT ON performance_schema.setup_instruments TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_current TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_history TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_history_long TO pfs_user_4;
+connection pfs_user_4;
# User pfs_user_4 should now be allowed to tweak instrumentation
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
@@ -573,6 +585,8 @@ TRUNCATE TABLE performance_schema.events_waits_history_long;
TRUNCATE TABLE performance_schema.events_waits_history;
TRUNCATE TABLE performance_schema.events_waits_current;
# Clean up
+disconnect pfs_user_4;
+connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM pfs_user_4;
DROP USER pfs_user_4;
flush privileges;