diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-11-06 12:35:19 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-05 17:22:26 +0100 |
commit | fafb35ee517f309d9e507f6e3908caca5d8cd257 (patch) | |
tree | 2b077c5fb367d221dd03b30365e66e9a8aa3b28f /mysql-test/main/grant2.result | |
parent | b3ded21922fc684c3c1aeb4ad57161bc2fec5859 (diff) | |
download | mariadb-git-fafb35ee517f309d9e507f6e3908caca5d8cd257.tar.gz |
MDEV-20076: SHOW GRANTS does not quote role names properlybb-10.3-MDEV-20076
Quotes added to output.
Diffstat (limited to 'mysql-test/main/grant2.result')
-rw-r--r-- | mysql-test/main/grant2.result | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result index ffb41c1b5f8..022b94d641b 100644 --- a/mysql-test/main/grant2.result +++ b/mysql-test/main/grant2.result @@ -59,12 +59,12 @@ disconnect user1; connection default; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT CREATE USER ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT CREATE USER ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `my\_%`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION show grants for mysqltest_2@localhost; Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_2`@`localhost` +GRANT ALL PRIVILEGES ON `my\_1`.* TO `mysqltest_2`@`localhost` WITH GRANT OPTION show grants for mysqltest_3@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost' delete from mysql.user where user like 'mysqltest\_%'; @@ -88,8 +88,8 @@ disconnect user2; connection default; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION delete from mysql.user where user like 'mysqltest\_%'; delete from mysql.db where user like 'mysqltest\_%'; drop database mysqltest_1; @@ -103,8 +103,8 @@ connect mrbad, localhost, mysqltest_1,,mysqltest; connection mrbad; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT ON `mysqltest`.* TO `mysqltest_1`@`localhost` insert into t1 values (1, 'I can''t change it!'); update t1 set data='I can change it!' where id = 1; ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' @@ -198,13 +198,13 @@ host db user table_name column_name % test mysqltest_2 t2 c2 show grants for 'mysqltest_1'; Grants for mysqltest_1@% -GRANT USAGE ON *.* TO 'mysqltest_1'@'%' +GRANT USAGE ON *.* TO "mysqltest_1"@"%" show grants for 'mysqltest_2'; Grants for mysqltest_2@% -GRANT SELECT ON *.* TO 'mysqltest_2'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' -GRANT INSERT ON "test".* TO 'mysqltest_2'@'%' -GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%' -GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%' +GRANT SELECT ON *.* TO "mysqltest_2"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO "mysqltest_2"@"%" +GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_2"@"%" +GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%" drop user 'mysqltest_1'; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; host user password @@ -239,10 +239,10 @@ host db user table_name column_name % test mysqltest_1 t2 c2 show grants for 'mysqltest_1'; Grants for mysqltest_1@% -GRANT SELECT ON *.* TO 'mysqltest_1'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' -GRANT INSERT ON "test".* TO 'mysqltest_1'@'%' -GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%' -GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%' +GRANT SELECT ON *.* TO "mysqltest_1"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO "mysqltest_1"@"%" +GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_1"@"%" +GRANT UPDATE ON "test"."t1" TO "mysqltest_1"@"%" drop user 'mysqltest_1', 'mysqltest_3'; drop user 'mysqltest_1'; ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%' @@ -292,19 +292,19 @@ drop user 'mysqltest_2'; create user '%@b'@'b'; show grants for '%@b'@'b'; Grants for %@b@b -GRANT USAGE ON *.* TO '%@b'@'b' +GRANT USAGE ON *.* TO "%@b"@"b" grant select on mysql.* to '%@b'@'b'; show grants for '%@b'@'b'; Grants for %@b@b -GRANT USAGE ON *.* TO '%@b'@'b' -GRANT SELECT ON "mysql".* TO '%@b'@'b' +GRANT USAGE ON *.* TO "%@b"@"b" +GRANT SELECT ON "mysql".* TO "%@b"@"b" rename user '%@b'@'b' to '%@a'@'a'; show grants for '%@b'@'b'; ERROR 42000: There is no such grant defined for user '%@b' on host 'b' show grants for '%@a'@'a'; Grants for %@a@a -GRANT USAGE ON *.* TO '%@a'@'a' -GRANT SELECT ON "mysql".* TO '%@a'@'a' +GRANT USAGE ON *.* TO "%@a"@"a" +GRANT SELECT ON "mysql".* TO "%@a"@"a" drop user '%@a'@'a'; create user mysqltest_2@localhost; grant create user on *.* to mysqltest_2@localhost; @@ -324,8 +324,8 @@ connect user4,localhost,mysqltest_3,,; connection user4; show grants; Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_3`@`localhost` +GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO `mysqltest_3`@`localhost` select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' insert into mysql.user set host='%', user='mysqltest_B'; @@ -350,8 +350,8 @@ connect n1,127.0.0.1,mysqltest_1,,mysqltest_1,$MASTER_MYPORT,$MASTER_MYSOCK; connection n1; show grants for current_user(); Grants for mysqltest_1@127.0.0.0/255.0.0.0 -GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' -GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' +GRANT USAGE ON *.* TO `mysqltest_1`@`127.0.0.0/255.0.0.0` +GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO `mysqltest_1`@`127.0.0.0/255.0.0.0` select * from t1; i 1 |