Bug #86434 MySQL Server Has Gone Away - Useless Feature
Submitted: 23 May 2017 20:44 Modified: 24 May 2017 10:47
Reporter: Roger Webb Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S4 (Feature request)
Version:6.3 OS:Windows
Assigned to: CPU Architecture:Any

[23 May 2017 20:44] Roger Webb
Description:
After sitting idle for a period of time, executing a query will return an error of "Error Code: 2006.  MySQL server has gone away".  After running into this issue several times, I was able to find the solution online, which is going to "Query" -> "Reconnect to server".  This rectifies the problem until the server "goes away" (where?) again.

There is no way this functionality would ever be of use to a human using this product.  I can't imagine anyone trying to execute a query, getting that error, and thinking "yeah, that makes sense, guess I didn't need that query result".  If the solution is simply to reconnect, the software should do this and obscure this unnecessary step from the user.

How to repeat:
Open workbench, wait awhile and execute a query.

Suggested fix:
On query execution, if the MySQL Server returns an error indicating it has "gone away", the software should reconnect to the server and continue with query execution.
[23 May 2017 21:56] MySQL Verification Team
Thank you for the bug report.

Please read about the server:

https://dev.mysql.com/doc/refman/5.7/en/gone-away.html

and WorkBench configuration parameters: Edit->Preferences->SQL Editor-> Mysql Session
[24 May 2017 3:07] Roger Webb
Thank you for your prompt reply!  The settings you reference do not address the issue.  The keep alive and timeout settings dictate session behavior.  The tool should not have to maintain a persistent connection to the server in order to execute queries over a period of time.  If the editor is idle, it would simply tie up a connection for no reason.

If the session has timed out or is no longer active/alive/etc, the editor should simply reconnect.  There is no operational or security benefit to having to manually reconnect to the server to execute a query.  It's just an extra, unnecessary step.  As it violates the expected use case and has no quantifiable benefit for what has to be the vast majority of users, it comes across as buggy.  If you would like to re-assign it as a feature request, that would be agreeable to me, but either way, it would be good for this to be addressed.

Thank you again for your time.
[24 May 2017 10:47] Chiranjeevi Battula
Hello Roger,

Thank you for your feedback.
Verified based on internal discussion with dev's will take it up as a feature request.

Thanks,
Chiranjeevi.