diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-11 14:40:35 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-11 14:40:35 +0100 |
commit | 646d1ec83a57d9a5b380079afc3612c1d9acadd5 (patch) | |
tree | b46ec54915361f3baa221bcd01b4308a55c59c48 /mysql-test/main/grant5.test | |
parent | c1eaa385ffb44bdf6264d2cc4b4cc0e10284c88a (diff) | |
parent | 58b70dc13630d2f2f0244359d6351085d70fd5dd (diff) | |
download | mariadb-git-646d1ec83a57d9a5b380079afc3612c1d9acadd5.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/main/grant5.test')
-rw-r--r-- | mysql-test/main/grant5.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test index 43f5b9c180f..307549ec9d8 100644 --- a/mysql-test/main/grant5.test +++ b/mysql-test/main/grant5.test @@ -34,6 +34,56 @@ REVOKE EXECUTE ON PROCEDURE sp FROM u; REVOKE PROCESS ON *.* FROM u; DROP TABLE t1; +--echo # +--echo # MDEV-20076: SHOW GRANTS does not quote role names properly +--echo # + +create role 'role1'; +create role 'fetch'; +create role 'role-1'; +create role 'rock\'n\'roll'; +create user 'user1'@'localhost'; +create user 'fetch'@'localhost'; +create user 'user-1'@'localhost'; +create user 'O\'Brien'@'localhost'; +grant select on mysql.user to role1; +grant select on mysql.user to 'fetch'; +grant select on mysql.user to 'role-1'; +grant select on mysql.user to 'rock\'n\'roll'; +GRANT 'role1' TO 'user1'@'localhost'; +GRANT 'fetch' TO 'fetch'@'localhost'; +GRANT 'role-1' TO 'user-1'@'localhost'; +GRANT 'rock\'n\'roll' TO 'O\'Brien'@'localhost'; +show grants for 'role1'; +show grants for 'fetch'; +show grants for 'role-1'; +show grants for 'rock\'n\'roll'; +show grants for 'user1'@'localhost'; +show grants for 'fetch'@'localhost'; +show grants for 'user-1'@'localhost'; +show grants for 'O\'Brien'@'localhost'; +set @save_sql_quote_show_create= @@sql_quote_show_create; +set @@sql_quote_show_create= OFF; +show grants for 'role1'; +show grants for 'fetch'; +show grants for 'role-1'; +show grants for 'rock\'n\'roll'; +show grants for 'user1'@'localhost'; +show grants for 'fetch'@'localhost'; +show grants for 'user-1'@'localhost'; +show grants for 'O\'Brien'@'localhost'; +set @@sql_quote_show_create= @save_sql_quote_show_create; +drop role 'role1'; +drop role 'fetch'; +drop role 'role-1'; +drop role 'rock\'n\'roll'; +drop user 'user1'@'localhost'; +drop user 'fetch'@'localhost'; +drop user 'user-1'@'localhost'; +drop user 'O\'Brien'@'localhost'; + +--echo # End of 10.3 tests + # # MDEV-12321 authentication plugin: SET PASSWORD support # @@ -131,3 +181,5 @@ drop user twg@'%'; insert mysql.tables_priv (host,db,user,table_name,grantor,table_priv) values ('localhost','','otto','t1','root@localhost','select'); flush privileges; delete from mysql.tables_priv where db=''; + +--echo # End of 10.4 tests |