Bug #45604 Connection errors are not counted properly
Submitted: 19 Jun 2009 9:51 Modified: 19 Jun 2009 9:56
Reporter: Alexander Nozdrin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.4 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[19 Jun 2009 9:51] Alexander Nozdrin
Description:
According to The Manual
(http://dev.mysql.com/doc/refman/6.0/en/blocked-host.html)
the server should count connection errors for a client host and
block new connections when max_connect_errors is exceeded.

This functionality is broken.

  - First, due to Bug#45584 each client is treated as
    a different host, so connection errors are counted
    per client, not per host.

  - Then, connection errors counter is reset in sql_connect.cc
    when negotiating with a client reaches some point.

See also Bug#45283.

How to repeat:
Analyze the code.
[19 Jun 2009 9:56] Alexander Nozdrin
Closed as a duplicate of Bug#45283.
Sorry for the mess.