Skip to content

Commit f354e45

Browse files
committed
Bug#33578113: DROP privilege on performance_schema.* can't be revoked
test case only
1 parent 1430cf7 commit f354e45

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

mysql-test/r/grant.result

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ set GLOBAL sql_mode="";
22
set LOCAL sql_mode="";
33
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
44
SET GLOBAL log_bin_trust_function_creators = 1;
5-
drop table if exists t1;
6-
drop database if exists mysqltest;
75
connect master,localhost,root,,;
86
connection master;
97
SET NAMES binary;
@@ -2785,5 +2783,13 @@ DROP USER foo;
27852783
DROP TABLE db.t;
27862784
DROP DATABASE db;
27872785
#
2786+
# Bug#33578113: DROP privilege on performance_schema.* can't be revoked
2787+
#
2788+
connection default;
2789+
CREATE USER bug33578113;
2790+
GRANT DROP ON performance_schema.* TO bug33578113;
2791+
REVOKE DROP ON performance_schema.* FROM bug33578113;
2792+
DROP USER bug33578113;
2793+
#
27882794
# End of 10.2 tests
27892795
#

mysql-test/t/grant.test

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Test of GRANT commands
22

33
# Grant tests not performed with embedded server
4-
-- source include/not_embedded.inc
4+
--source include/not_embedded.inc
55

66
# Save the initial number of concurrent sessions
77
--source include/count_sessions.inc
@@ -11,12 +11,6 @@ set LOCAL sql_mode="";
1111
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
1212
SET GLOBAL log_bin_trust_function_creators = 1;
1313

14-
# Cleanup
15-
--disable_warnings
16-
drop table if exists t1;
17-
drop database if exists mysqltest;
18-
--enable_warnings
19-
2014
connect (master,localhost,root,,);
2115
connection master;
2216
SET NAMES binary;
@@ -2292,6 +2286,16 @@ DROP USER foo;
22922286
DROP TABLE db.t;
22932287
DROP DATABASE db;
22942288

2289+
--echo #
2290+
--echo # Bug#33578113: DROP privilege on performance_schema.* can't be revoked
2291+
--echo #
2292+
connection default;
2293+
CREATE USER bug33578113;
2294+
GRANT DROP ON performance_schema.* TO bug33578113;
2295+
REVOKE DROP ON performance_schema.* FROM bug33578113;
2296+
DROP USER bug33578113;
2297+
--source include/wait_until_count_sessions.inc
2298+
22952299
--echo #
22962300
--echo # End of 10.2 tests
22972301
--echo #

0 commit comments

Comments
 (0)