Bug #75082 would like easy way to distinguish between KILL CONNECTION and a server restart
Submitted: 3 Dec 2014 8:12
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Connection Handling Severity:S4 (Feature request)
Version:5.7.6 OS:Any
Assigned to: CPU Architecture:Any

[3 Dec 2014 8:12] Shane Bester
Description:
In both cases mysql client api gets the same error:

ERROR 2013 (HY000): Lost connection to MySQL server during query

I need to know if this was a result of KILL CONNECTION or if server really did restart?  Client application would handle the cases differently.

How to repeat:
.

Suggested fix:
Would be nice to get a different mysql_errno for the KILL case. Actually I'm unsure if this is a client or server FR.
We can determine via thread_id() if the server was restarted then thread_id may decrease after a reconnect, but this is more work, and my client app needs to stop executing asap if server crashed (in order to save its state).
[16 Nov 2016 13:10] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=83843