Important! Fixed underlying network socket unexpected silent death.
Important! Fixed underlying network socket unexpected silent death.

In production at rare (once at 2-3 days) occasion mysql-5.6.11-win-x64 unexpectedly closes socket. Situation is similar when I just forcibly kill mysqld process. 

Next, Protocol.destroy() called very silently because of socket pipe, and all consequent queries return with error code  'PROTOCOL_ENQUEUE_AFTER_DESTROY'.

Suggested disconnectHandler doesn't work out due to 'false' value at the error flag fatal.

Error message 'PROTOCOL_ENQUEUE_AFTER_DESTROY' in such situation seems to be misleading, since there was no user-code invocation on Connection.destroy(), and, moreover the connection to the server is already gone.

Suggested patch supposed to fix this and assumes unexpected socket close as 'PROTOCOL_CONNECTION_LOST'.

I am checking it on my env right now.

Thanks!
Merge pull request #667 from simak-alexandr/patch-1

Important! Fixed underlying network socket unexpected silent death.