Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
Description
I suppose I_S.ENABLED_ROLES should return at least the same as CURRENT_ROLE, but in fact it's not always so.
--error 0,ER_CANNOT_USER
|
drop role r1; |
|
create role r1; |
set role r1; |
|
select current_role(); |
select * from information_schema.enabled_roles; |
|
drop role r1; |
|
select current_role(); |
select * from information_schema.enabled_roles; |
After the role is dropped, current_role() still returns the name of the dropped role, while I_S.enabled_roles contains NULL:
drop role r1;
|
select current_role();
|
current_role()
|
r1
|
select * from information_schema.enabled_roles;
|
ROLE_NAME
|
NULL
|
Since current_role behavior is the same as for current_user (if the user is dropped, current_user for an open session still returns the name), I guess I_S.enabled_roles should do the same.