Bug #2400 Connection failure with wait_timeout > 2147483
Submitted: 15 Jan 2004 9:10 Modified: 3 Feb 2004 11:44
Reporter: Lars-Goran Forsberg Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.17 OS:Windows (Windows 2000)
Assigned to: Michael Widenius CPU Architecture:Any

[15 Jan 2004 9:10] Lars-Goran Forsberg
When the MySQL server is configured with wait_timeout larger than 2147483, client connections are lost if they are idle for more than ~0.5 seconds. Same behaviour with both JDBC client and mysql client.
If queries are executed repeatedly without any delay between them, the connection seems to stay alive.

Setting wait_timeout to higher values worked with 4.0.13 and earlier versions, and seems to work for HP-UX binaries.

How to repeat:
Install MySQL 4.0.17 on Windows.
Start the mysqld process (either as service or standalone).
Connect to server using the mysql.exe client.
Execute "set wait_timeout=2147484;".
Wait a second.
Execute some other query, for example "show databases;".
The result for this query should be: "ERROR 2013: Lost connection to MySQL server during query"
Execute "show variables;" and it will show that the wait_timeout variable is reset to the value set at server start.

The other way is to configure my.cnf with the wait_timeout variable set to 2147484. This will cause every client connection to be lost if not queries are repeated with very short intervals.

Suggested fix:
[15 Jan 2004 9:24] MySQL Verification Team
Thank you for the bug report I was able to repeat.
[3 Feb 2004 11:44] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

I have now limited the wait_timeout on windows to 2147483 seconds.