From: Ants Aasma Date: Wed, 27 Jun 2007 09:51:17 +0000 (+0000) Subject: some errors of droppedm mysql connections weren't being caught by the disconnect... X-Git-Tag: rel_0_3_9~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f70a1c386af9f59a9b7dc67d45158d04bd74bf4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git some errors of droppedm mysql connections weren't being caught by the disconnect detecting logic, fixes #625 --- diff --git a/CHANGES b/CHANGES index 054557c060..0b17de8d7b 100644 --- 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 diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 6e4e0a660d..769e69f962 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -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'):