Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels: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.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
As discussed, it works the same way for current_user vs I_S.user_privileges, so it can be considered either not a bug at all, or something not worth fixing. Closing as such.