mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
move role tests to a dedicated suite
This commit is contained in:
parent
779693f409
commit
a3f4b58dac
45 changed files with 6 additions and 5 deletions
57
mysql-test/suite/roles/none_public.test
Normal file
57
mysql-test/suite/roles/none_public.test
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
source include/not_embedded.inc;
|
||||
|
||||
create role role1;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
create role none;
|
||||
--error ER_INVALID_ROLE
|
||||
create role public;
|
||||
--error ER_CANNOT_USER
|
||||
drop role none;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
grant none to role1;
|
||||
--error ER_INVALID_ROLE
|
||||
grant role1 to none;
|
||||
--error ER_INVALID_ROLE
|
||||
grant select on *.* to none;
|
||||
--error ER_INVALID_ROLE
|
||||
grant public to role1;
|
||||
--error ER_INVALID_ROLE
|
||||
grant role1 to public;
|
||||
--error ER_INVALID_ROLE
|
||||
grant select on *.* to public;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
grant role1 to current_role;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
revoke none from role1;
|
||||
--error ER_INVALID_ROLE
|
||||
revoke role1 from none;
|
||||
--error ER_INVALID_ROLE
|
||||
revoke select on *.* from none;
|
||||
--error ER_INVALID_ROLE
|
||||
revoke public from role1;
|
||||
--error ER_INVALID_ROLE
|
||||
revoke role1 from public;
|
||||
--error ER_INVALID_ROLE
|
||||
revoke select on *.* from public;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
show grants for none;
|
||||
--error ER_INVALID_ROLE
|
||||
show grants for public;
|
||||
|
||||
--error ER_INVALID_ROLE
|
||||
create definer=none view test.v1 as select 1;
|
||||
--error ER_INVALID_ROLE
|
||||
create definer=public view test.v1 as select 1;
|
||||
|
||||
drop role role1;
|
||||
|
||||
optimize table mysql.user; # to remove deleted rows and have stable row order
|
||||
insert mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
|
||||
flush privileges;
|
||||
delete from mysql.user where is_role='Y';
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue