1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-20076: SHOW GRANTS does not quote role names properly

Quotes added to output.
This commit is contained in:
Oleksandr Byelkin
2019-11-06 12:35:19 +01:00
parent b3ded21922
commit fafb35ee51
103 changed files with 2124 additions and 1997 deletions

View File

@ -9,7 +9,7 @@ create table mysqltest.t (a int) with system versioning;
connection user1;
show grants;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
delete history from mysqltest.t before system_time now();
ERROR 42000: DELETE HISTORY command denied to user 'mysqltest_1'@'localhost' for table 't'
connection root;
@ -18,16 +18,16 @@ grant delete history on mysqltest.t to mysqltest_1@localhost;
connection user1;
show grants;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT DELETE HISTORY ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
GRANT DELETE HISTORY ON `mysqltest`.`t` TO 'mysqltest_1'@'localhost'
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost`
GRANT DELETE HISTORY ON `mysqltest`.`t` TO `mysqltest_1`@`localhost`
delete history from mysqltest.t before system_time now();
connection root;
grant all on *.* to mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'localhost'
GRANT DELETE HISTORY ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
GRANT DELETE HISTORY ON `mysqltest`.`t` TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON *.* TO `mysqltest_1`@`localhost`
GRANT DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost`
GRANT DELETE HISTORY ON `mysqltest`.`t` TO `mysqltest_1`@`localhost`
drop user mysqltest_1@localhost;
drop database mysqltest;