| 4559 | */ |
| 4560 | |
| 4561 | bool is_acl_user(const LEX_CSTRING &host, const LEX_CSTRING &user) |
| 4562 | { |
| 4563 | bool res; |
| 4564 | |
| 4565 | /* --skip-grants */ |
| 4566 | if (!initialized) |
| 4567 | return TRUE; |
| 4568 | |
| 4569 | mysql_mutex_lock(&acl_cache->lock); |
| 4570 | |
| 4571 | if (*host.str) // User |
| 4572 | res= find_user_exact(host, user) != NULL; |
| 4573 | else // Role |
| 4574 | res= find_acl_role(user, false) != NULL; |
| 4575 | |
| 4576 | mysql_mutex_unlock(&acl_cache->lock); |
| 4577 | return res; |
| 4578 | } |
| 4579 | |
| 4580 | |
| 4581 | /* |
no test coverage detected