mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
788 B
SQL
29 lines
788 B
SQL
DROP USER IF EXISTS test_user_01073;
|
|
|
|
CREATE USER test_user_01073;
|
|
SHOW CREATE USER test_user_01073;
|
|
|
|
SELECT 'A';
|
|
SHOW GRANTS FOR test_user_01073;
|
|
|
|
GRANT SELECT ON db1.* TO test_user_01073;
|
|
GRANT SELECT ON db2.table TO test_user_01073;
|
|
GRANT SELECT(col1) ON db3.table TO test_user_01073;
|
|
GRANT SELECT(col1, col2) ON db4.table TO test_user_01073;
|
|
GRANT INSERT ON *.* TO test_user_01073;
|
|
GRANT DELETE ON *.* TO test_user_01073;
|
|
|
|
SELECT 'B';
|
|
SHOW GRANTS FOR test_user_01073;
|
|
|
|
REVOKE SELECT ON db1.* FROM test_user_01073;
|
|
REVOKE SELECT ON db2.table FROM test_user_01073;
|
|
REVOKE SELECT ON db3.table FROM test_user_01073;
|
|
REVOKE SELECT(col2) ON db4.table FROM test_user_01073;
|
|
REVOKE INSERT ON *.* FROM test_user_01073;
|
|
|
|
SELECT 'C';
|
|
SHOW GRANTS FOR test_user_01073;
|
|
|
|
DROP USER test_user_01073;
|