Skip to content

Commit

Permalink
add show grants after revoke in stateless test
Browse files Browse the repository at this point in the history
  • Loading branch information
flaneur2020 committed Dec 14, 2021
1 parent 46b77dc commit 8537e88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/suites/0_stateless/05_0006_ddl_grant_privilege.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GRANT CREATE,SELECT,INSERT,SET ON 'default'.* TO 'test-grant'@'localhost'
GRANT SELECT ON 'db01'.* TO 'test-grant'@'localhost'
GRANT SELECT ON 'db01'.'tb1' TO 'test-grant'@'localhost'
GRANT CREATE,SELECT,INSERT,SET ON 'default'.* TO 'test-grant'@'localhost'
GRANT SELECT ON 'db01'.'tb1' TO 'test-grant'@'localhost'
GRANT SELECT ON 'db01'.'tb1' TO 'test-grant'@'localhost'
3 changes: 2 additions & 1 deletion tests/suites/0_stateless/05_0006_ddl_grant_privilege.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ GRANT SELECT ON db01.tb1 TO 'test-grant'@'localhost';
GRANT SELECT ON `db01`.'tb1' TO 'test-grant'@'localhost';
GRANT SELECT ON db01.tbnotexists TO 'test-grant'@'localhost'; -- {ErrorCode 25}
GRANT SELECT ON dbnotexists.* TO 'test-grant'@'localhost'; -- {ErrorCode 3}

SHOW GRANTS FOR 'test-grant'@'localhost';

REVOKE SELECT ON db01.* FROM 'test-grant'@'localhost';
SHOW GRANTS FOR 'test-grant'@'localhost';
REVOKE ALL PRIVILEGES ON * FROM 'test-grant'@'localhost';
SHOW GRANTS FOR 'test-grant'@'localhost';

DROP DATABASE `db01`;

0 comments on commit 8537e88

Please sign in to comment.