diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 949e9825dde..59980264741 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -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);