diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index dde4b6c5c93..8439db0be6b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -499,7 +499,10 @@ check_connections(THD *thd) thd->host=ip_to_hostname(&thd->remote.sin_addr,&connect_errors); /* Cut very long hostnames to avoid possible overflows */ if (thd->host) + { thd->host[min(strlen(thd->host), HOSTNAME_LENGTH)]= 0; + thd->host_or_ip= thd->host; + } if (connect_errors > max_connect_errors) return(ER_HOST_IS_BLOCKED); } |