mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-20076: SHOW GRANTS does not quote role names properly
Quotes added to output.
This commit is contained in:
@@ -145,8 +145,8 @@ trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@l
|
||||
connect testuser2, localhost, testuser2, , db_datadict;
|
||||
SHOW GRANTS FOR 'testuser2'@'localhost';
|
||||
Grants for testuser2@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser2'@'localhost'
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE HISTORY ON `db_datadict`.`t1` TO 'testuser2'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser2`@`localhost`
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE HISTORY ON `db_datadict`.`t1` TO `testuser2`@`localhost`
|
||||
# No TRIGGER Privilege --> no result for query
|
||||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_name = 'trg1';
|
||||
@@ -156,8 +156,8 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
|
||||
connect testuser3, localhost, testuser3, , test;
|
||||
SHOW GRANTS FOR 'testuser3'@'localhost';
|
||||
Grants for testuser3@localhost
|
||||
GRANT TRIGGER ON *.* TO 'testuser3'@'localhost'
|
||||
GRANT SELECT ON `db_datadict`.`t1` TO 'testuser3'@'localhost'
|
||||
GRANT TRIGGER ON *.* TO `testuser3`@`localhost`
|
||||
GRANT SELECT ON `db_datadict`.`t1` TO `testuser3`@`localhost`
|
||||
# TRIGGER Privilege + SELECT Privilege on t1 --> result for query
|
||||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_name = 'trg1';
|
||||
@@ -169,7 +169,7 @@ trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@l
|
||||
connect testuser4, localhost, testuser4, , test;
|
||||
SHOW GRANTS FOR 'testuser4'@'localhost';
|
||||
Grants for testuser4@localhost
|
||||
GRANT TRIGGER ON *.* TO 'testuser4'@'localhost'
|
||||
GRANT TRIGGER ON *.* TO `testuser4`@`localhost`
|
||||
# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
|
||||
SELECT * FROM db_datadict.t1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1'
|
||||
|
||||
Reference in New Issue
Block a user