MariaDB 10.0.5

The ENABLED_ROLES table was introduced in MariaDB 10.0.5

The Information Schema ENABLED_ROLES table shows the enabled roles for the current session.

It contains the following column:

ColumnDescription
ROLE_NAMEThe enabled role name, or NULL.

This table contains one row, which contains the name of the current role. If no role is used, the row contains a NULL value.

The roles that the current user can enable are listed in the APPLICABLE_ROLES Information Schema table.

See also CURRENT_ROLE().

Examples

SELECT * FROM INFORMATION_SCHEMA.ENABLED_ROLES;
+-----------+
| ROLE_NAME |
+-----------+
| NULL      |
+-----------+

SET ROLE staff;

SELECT * FROM INFORMATION_SCHEMA.ENABLED_ROLES;
+-----------+
| ROLE_NAME |
+-----------+
| staff     |
+-----------+

Comments

Comments loading...