diff options
author | unknown <timour@askmonty.org> | 2013-07-03 12:19:03 +0300 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2013-07-03 12:19:03 +0300 |
commit | 5f0d489da8771d8ddcc440ecc811a190a421e486 (patch) | |
tree | 22a4af06c737f39720e59d9bfac2388656163f9b /sql | |
parent | ecbf36a914b696b01ae1497567025e239f4ea693 (diff) | |
download | mariadb-git-5f0d489da8771d8ddcc440ecc811a190a421e486.tar.gz |
MDEV-4058
MySQL 5.6.10 performance schema: merge of the test files for the host_cache table
Diffstat (limited to 'sql')
-rw-r--r-- | sql/hostname.cc | 6 | ||||
-rw-r--r-- | sql/sql_acl.cc | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc index 1cd00d39a91..cca5b185e38 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -282,7 +282,7 @@ static void add_hostname(const char *ip_key, const char *hostname, if (specialflag & SPECIAL_NO_HOST_CACHE) return; - ulonglong now= my_time(); + ulonglong now= my_hrtime().val; mysql_mutex_lock(&hostname_cache->lock); @@ -298,7 +298,7 @@ void inc_host_errors(const char *ip_string, Host_errors *errors) if (!ip_string) return; - ulonglong now= my_time(); + ulonglong now= my_hrtime().val; char ip_key[HOST_ENTRY_KEY_SIZE]; prepare_hostname_cache_key(ip_string, ip_key); @@ -448,7 +448,7 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, if (!(specialflag & SPECIAL_NO_HOST_CACHE)) { - ulonglong now= my_time(); + ulonglong now= my_hrtime().val; mysql_mutex_lock(&hostname_cache->lock); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 559228b7e43..601fb5bf786 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -9071,6 +9071,9 @@ bool acl_authenticate(THD *thd, uint connect_errors, /* we need to find the proxy user, but there was none */ if (!proxy_user) { + Host_errors errors; + errors.m_proxy_user= 1; + inc_host_errors(mpvio.thd->security_ctx->ip, &errors); if (!thd->is_error()) login_failed_error(thd); DBUG_RETURN(1); @@ -9087,6 +9090,9 @@ bool acl_authenticate(THD *thd, uint connect_errors, mpvio.auth_info.authenticated_as, TRUE); if (!acl_proxy_user) { + Host_errors errors; + errors.m_proxy_user_acl= 1; + inc_host_errors(mpvio.thd->security_ctx->ip, &errors); if (!thd->is_error()) login_failed_error(thd); mysql_mutex_unlock(&acl_cache->lock); @@ -9115,6 +9121,9 @@ bool acl_authenticate(THD *thd, uint connect_errors, */ if (acl_check_ssl(thd, acl_user)) { + Host_errors errors; + errors.m_ssl= 1; + inc_host_errors(mpvio.thd->security_ctx->ip, &errors); login_failed_error(thd); DBUG_RETURN(1); } |