CURRENT_ROLE
Syntax
CURRENT_ROLE()
Description
This function is used to view the activated role of the current user in the current session. If the query result is NONE, it indicates that the current user has no activated role. Only the permissions of activated roles can be used by the user.
Examples
SELECT CURRENT_ROLE();
The return result is as follows:
+-----------------------------+
| CURRENT_ROLE() |
+-----------------------------+
| `role002`@`%`,`role001`@`%` |
+-----------------------------+
1 row in set (0.001 sec)