Repository navigation
v2.2.0
MySQL v2.2.0
Connection-loss errors
- A command written before the connection drops now raises error 2013 even when no reply arrived. The server may already have executed and committed it; retrying can duplicate a write.
- Error 2006 identifies a command refused on a dead connection or an incomplete command write. It says nothing about earlier commands or lost transaction/session state.
- TCP resets and broken pipes, including those wrapped by TLS, use the same connection-loss errors instead of leaking socket exceptions.
- A TLS peer that closes before authentication completes raises
MySQL.TLSNegotiationError, including a client-certificate rejection received as a socket reset.
Callers that recognize connection loss by error code should handle 2006, 2013, and 4031, plus MySQL.TimeoutError. A timeout while waiting for a reply also leaves execution uncertain.
The connection closes after a transport failure. The existing reconnect policy is unchanged. No new public types, fields, or exports.
Merged pull requests:
- Distinguish sent from unsent commands on connection loss (2013 vs 2006) (#251) (@quinnj-bot[bot])
Closed issues:
- Error 2006 is raised both before a command is sent and after a sent command may have committed (#248)