mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 00:04:33 +01:00
MDEV-35663 Sporadic connection failures during FLUSH PRIVILEGES
during FLUSH PRIVILEGES, allow_all_hosts temporarily goes out of sync with acl_check_hosts and acl_wild_hosts. As it's tested in acl_check_host() without a mutex, let's re-test it under a mutex to make sure the value is correct. Note that it's just an optimization and it's ok to see outdated allow_all_hosts value here.
This commit is contained in:
parent
9f9072c344
commit
0031f4a74f
1 changed files with 2 additions and 1 deletions
|
@ -3948,7 +3948,8 @@ bool acl_check_host(const char *host, const char *ip)
|
|||
return 0;
|
||||
mysql_mutex_lock(&acl_cache->lock);
|
||||
|
||||
if ((host && my_hash_search(&acl_check_hosts,(uchar*) host,strlen(host))) ||
|
||||
if (allow_all_hosts ||
|
||||
(host && my_hash_search(&acl_check_hosts,(uchar*) host,strlen(host))) ||
|
||||
(ip && my_hash_search(&acl_check_hosts,(uchar*) ip, strlen(ip))))
|
||||
{
|
||||
mysql_mutex_unlock(&acl_cache->lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue