| 1 |
# |
| 2 |
# Make sure a warning is raised when acl cache lock acquire fails. |
| 3 |
# |
| 4 |
CREATE USER u1 IDENTIFIED BY 'foo'; |
| 5 |
CREATE ROLE r1; |
| 6 |
GRANT r1 to u1; |
| 7 |
GRANT SELECT ON test.* TO u1; |
| 8 |
SET GLOBAL DEBUG='+d,simulate_acl_cache_lock_failure'; |
| 9 |
SET ROLE ALL; |
| 10 |
SELECT * FROM INFORMATION_SCHEMA.ENABLED_ROLES; |
| 11 |
ROLE_NAME ROLE_HOST IS_DEFAULT IS_MANDATORY |
| 12 |
r1 % NO NO |
| 13 |
Warnings: |
| 14 |
Warning 3946 Failed to acquire lock on user management service, unable to determine if role `r1`@`%` is mandatory |
| 15 |
SET GLOBAL mandatory_roles = 'r1'; |
| 16 |
SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES ORDER BY GRANTEE, ROLE_NAME; |
| 17 |
USER HOST GRANTEE GRANTEE_HOST ROLE_NAME ROLE_HOST IS_GRANTABLE IS_DEFAULT IS_MANDATORY |
| 18 |
Warnings: |
| 19 |
Warning 3947 Failed to acquire lock on user management service, unable to fetch mandatory role list |
| 20 |
SET GLOBAL mandatory_roles=default; |
| 21 |
SET GLOBAL DEBUG=default; |
| 22 |
DROP USER u1; |
| 23 |
DROP ROLE r1; |