Syntax
CURRENT_ROLE()
Purpose
This function is used to view the role activated for the current user in the current session. If the query result is NONE, it indicates that the current user does not have any activated roles, and only the permissions of activated roles can be used by the user.
Examples
obclient [(none)]> SELECT CURRENT_ROLE();
The return result is as follows:
+-----------------------------+
| CURRENT_ROLE() |
+-----------------------------+
| `role002`@`%`,`role001`@`%` |
+-----------------------------+
1 row in set
