mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-20076: SHOW GRANTS does not quote role names properly
Quotes added to output.
This commit is contained in:
@ -10,25 +10,25 @@ SELECT * FROM testdb.t1;
|
||||
GRANT CREATE VIEW, SHOW VIEW ON testdb.v1 TO 'show_view_tbl'@'localhost';
|
||||
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
|
||||
Grants for show_view_tbl@localhost
|
||||
GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost'
|
||||
GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost'
|
||||
GRANT USAGE ON *.* TO `show_view_tbl`@`localhost`
|
||||
GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost`
|
||||
|
||||
GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
|
||||
SHOW GRANTS FOR 'select_only_c1'@'localhost';
|
||||
Grants for select_only_c1@localhost
|
||||
GRANT USAGE ON *.* TO 'select_only_c1'@'localhost'
|
||||
GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
|
||||
GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
|
||||
|
||||
"after fix privs"
|
||||
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
|
||||
Grants for show_view_tbl@localhost
|
||||
GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost'
|
||||
GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost'
|
||||
GRANT USAGE ON *.* TO `show_view_tbl`@`localhost`
|
||||
GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost`
|
||||
|
||||
SHOW GRANTS FOR 'select_only_c1'@'localhost';
|
||||
Grants for select_only_c1@localhost
|
||||
GRANT USAGE ON *.* TO 'select_only_c1'@'localhost'
|
||||
GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
|
||||
GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
|
||||
|
||||
DROP USER 'show_view_tbl'@'localhost';
|
||||
DROP USER 'select_only_c1'@'localhost';
|
||||
|
Reference in New Issue
Block a user