mariadb/mysql-test/suite/roles/set_role-5232.test
Dmitry Shulga 5ee05cb8d7 MDEV-35617: DROP USER should leave no active session for that user
Follow-up patch with adjustments of test files and updates of result
files for tests. Part 5
2025-06-09 18:27:27 +07:00

22 lines
510 B
Text

#
# MDEV-5232 SET ROLE checks privileges differently from check_access()
#
--source include/not_embedded.inc
create user ''@localhost;
create user c;
grant select on mysql.* to c;
create role r1;
grant r1 to c;
connect (c,localhost,c,,,,,);
select user(), current_user();
--error ER_TABLEACCESS_DENIED_ERROR
select user from mysql.user group by user;
--error ER_INVALID_ROLE
set role r1;
disconnect c;
connection default;
drop role r1;
--disable_warnings
drop user c;
drop user ''@localhost;
--enable_warnings