We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b18bb6 commit 15eaee5Copy full SHA for 15eaee5
pymysql/connections.py
@@ -694,6 +694,10 @@ def _read_bytes(self, num_bytes):
694
raise err.OperationalError(
695
CR.CR_SERVER_LOST,
696
"Lost connection to MySQL server during query (%s)" % (e,))
697
+ except BaseException:
698
+ # Don't convert unknown exception to MySQLError.
699
+ self._force_close()
700
+ raise
701
if len(data) < num_bytes:
702
self._force_close()
703
0 commit comments