Bug #83843 Error message "MySQL server has gone away" sofistication
Submitted: 16 Nov 2016 12:29 Modified: 17 Nov 2016 9:40
Reporter: james wang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[16 Nov 2016 12:29] james wang
Description:
Currently, user will have the same error message for the following four scenaries:

1). When you kill statement via KILL <Query_ID>
2). When mysqld is gracefully stopped (or restarted)
3). You got timeout on server side e.g. wait_timeout reached for the connection.
4). You can receive that error if you send a query to the server that is incorrect or too large. 

May I suggest to have difference error messages as following: ?

1). "Your query has been killed"
2). "MySQL has gone away"
3). "Your query timed out
4). "Your query is too long"

Thanks

How to repeat:
n/a - it is improvement

Suggested fix:
n/a
[16 Nov 2016 12:54] Peter Laursen
It is the client that returns this error (command line CLI, C-api, probaby most/all connectors). It is listed here http://dev.mysql.com/doc/refman/5.7/en/error-messages-client.html.

When the client retuns this error it does not know what went wrong (or why). It only knows that a connection that was etablished previously, is not alive any more. The client cannot query the server for more information. And also the connection thread on the server has been closed by the server.

So I think it will be hard to improve even though I think it would be nice, obviously. At least it would in my understanding require a complete revamp of7extension to the protocol.

What I could request, and what I believe is not so hard, is not to close connenction to the client if max_allowed_package is exceeded but rather return  a server error ("this query needs a larger max_allowed_package setting and was not executed" or similar).

-- Peter
-- not a MySQL/Oracle person
[16 Nov 2016 13:09] MySQL Verification Team
related: http://bugs.mysql.com/bug.php?id=75082
[17 Nov 2016 9:40] MySQL Verification Team
Thank you for the feature request.