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] Shane Bester
http://bugs.mysql.com/bug.php?id=83843

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.061 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.