]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
some errors of droppedm mysql connections weren't being caught by the disconnect...
authorAnts Aasma <ants.aasma@gmail.com>
Wed, 27 Jun 2007 09:51:17 +0000 (09:51 +0000)
committerAnts Aasma <ants.aasma@gmail.com>
Wed, 27 Jun 2007 09:51:17 +0000 (09:51 +0000)
CHANGES
lib/sqlalchemy/databases/mysql.py

diff --git a/CHANGES b/CHANGES
index 054557c0608c7b37663b640d76f14401bee8af3f..0b17de8d7ba39e8f08839782b4a228893e6609c0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -51,6 +51,7 @@
       up ORM decision making [ticket:593]
     - added Interval type to types.py [ticket:595]
 - mysql
+    - fixed catching of some errors that imply a dropped connection [ticket:625]
     - fixed escaping of the modulo operator [ticket:624]
     - added 'fields' to reserved words [ticket:590]
 - oracle
index 6e4e0a660db9bf9e4f68e033e0e530e59e948c7c..769e69f962e72bffaaa370e0f15658fd3f9172c5 100644 (file)
@@ -1036,7 +1036,7 @@ class MySQLDialect(ansisql.ANSIDialect):
             pass
 
     def is_disconnect(self, e):
-        return isinstance(e, self.dbapi.OperationalError) and e.args[0] in (2006, 2014)
+        return isinstance(e, self.dbapi.OperationalError) and e.args[0] in (2006, 2013, 2014, 2045, 2055)
 
     def get_default_schema_name(self):
         if not hasattr(self, '_default_schema_name'):