Commit df16e759 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru Committed by Sergei Golubchik

Updated acl_roles_set_role-simple test to use default sql syntax.

Also called show grants before and after set role. Unfortunately the role
privileges printing are not implemented yet.
parent 5470c200
......@@ -22,10 +22,20 @@ Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv D
flush privileges;
select * from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
set role 'test_role1';
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO 'test_user'@'localhost'
set role test_role1;
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO 'test_user'@'localhost'
select * from mysql.roles_mapping;
HostFk UserFk RoleFk
localhost test_user test_role1
set role none;
select * from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
delete from mysql.user where user='test_role1';
delete from mysql.roles_mapping where UserFk='test_role1';
drop user 'test_user'@'localhost';
flush privileges;
......@@ -18,10 +18,17 @@ change_user 'test_user';
--error ER_TABLEACCESS_DENIED_ERROR
select * from mysql.roles_mapping;
set role 'test_role1';
show grants;
set role test_role1;
show grants;
select * from mysql.roles_mapping;
set role none;
--error ER_TABLEACCESS_DENIED_ERROR
select * from mysql.roles_mapping;
change_user 'root';
delete from mysql.user where user='test_role1';
delete from mysql.roles_mapping where UserFk='test_role1';
drop user 'test_user'@'localhost';
flush privileges;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment