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:
@ -196,8 +196,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
connect testuser1, localhost, testuser1, , test;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -205,8 +205,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
connection default;
|
||||
GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost';
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
@ -217,9 +217,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection testuser1;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -229,9 +229,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection default;
|
||||
ALTER TABLE db_datadict.my_table DROP COLUMN f3;
|
||||
GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
|
||||
@ -244,9 +244,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection testuser1;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -257,9 +257,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
SELECT f1, f3 FROM db_datadict.my_table;
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
connection default;
|
||||
@ -273,9 +273,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection testuser1;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -286,9 +286,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection default;
|
||||
DROP TABLE db_datadict.my_table;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
@ -300,9 +300,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection testuser1;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -313,9 +313,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
connection default;
|
||||
REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
@ -324,8 +324,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
connection testuser1;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
WHERE table_name = 'my_table'
|
||||
@ -333,8 +333,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
SHOW GRANTS FOR 'testuser1'@'localhost';
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
DROP USER 'testuser1'@'localhost';
|
||||
|
Reference in New Issue
Block a user