The examples were created with the MyWAY SQL manager: Download
How to use the CURRENT_ROLE() function in MySQL and MariaDB databases
In MySQL and MariaDB the CURRENT_ROLE() function can be used to return the name of the current privilege role.
In MySQL and MariaDB, roles are a way to manage and control user permissions. A set of permissions can be grouped in a role and assigned to multiple users. This is a easy way to manage permissions in databases. As such, permission roles provide a more organized and efficient way to manage user permissions, especially when multiple users require the same permissions.