summaryrefslogtreecommitdiff
path: root/mysql-test/main/grant5.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/grant5.test')
-rw-r--r--mysql-test/main/grant5.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 9c3f20396c4..0b4a63ab075 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -124,6 +124,20 @@ drop user 'fetch'@'localhost';
drop user 'user-1'@'localhost';
drop user 'O\'Brien'@'localhost';
+--echo #
+--echo # MDEV-26080 SHOW GRANTS does not quote role names properly for DEFAULT ROLE
+--echo #
+
+CREATE USER 'test-user';
+CREATE ROLE `r``o'l"e`;
+select user from mysql.user where is_role='Y';
+GRANT `r``o'l"e` TO 'test-user';
+SET DEFAULT ROLE `r``o'l"e` FOR 'test-user';
+# it is expected that quotes won't be shown correctly
+SHOW GRANTS FOR 'test-user';
+DROP ROLE `r``o'l"e`;
+DROP USER 'test-user';
+
--echo # End of 10.3 tests
#