Bug #7695 Should be able to disable max_connect_errors completely
Submitted: 6 Jan 2005 1:44 Modified: 16 Feb 2006 12:23
Reporter: Dean Ellis Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:4.0.24, 5.0.46 and all versions OS:Any
Assigned to: CPU Architecture:Any

[6 Jan 2005 1:44] Dean Ellis
Description:
You cannot set max_connect_errors to 0; one could assume that setting it to 0 would be a useful method of completely disabling max_connect_errors checking.

How to repeat:
SET GLOBAL MAX_CONNECT_ERRORS=0;
SHOW GLOBAL VARIABLES LIKE 'MAX_CONNECT_ERRORS';

Or try to completely disable the check, rather than effectively disabling it by setting it to a very large number.

Suggested fix:
Against 4.0.24:

===== mysqld.cc 1.520 vs edited =====
4188c4188
<     REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ~0L, 0, 1, 0},
---
>     REQUIRED_ARG, MAX_CONNECT_ERRORS, 0, ~0L, 0, 1, 0},
===== sql_parse.cc 1.386 vs edited =====
532c532
<       if (connect_errors > max_connect_errors)
---
>       if (max_connect_errors && connect_errors > max_connect_errors)
[16 Feb 2006 12:23] Valeriy Kravchuk
Thank you for a reasonable feature request.
[13 Mar 2008 18:37] Ben Krug
A customer has also requested the related ability to disable max_connect_errors for selected hosts.  Eg, allow host loadbalancer.internal.com unlimited connect errors.
[9 Nov 2009 21:52] James Day
I've closed bug #32222 as a duplicate of this one. There we have one private opinion expressed that zero is a valid choice meaning no failures allowed, so isn't suitable for use as meaning unlimited. Also an alternative patch suggestion.

The current limits on the high value setting allow 13 failures per second for ten years on a 32 bit server and five billion failures per second on a 64 bit server.

I'm making a request to the documentation team to clarify the meaning of large value.