summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-04-03 16:06:06 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-04-03 16:06:06 +0000
commit030ef1f0ef37ccaebde06e58f22cd0de5a74c5d0 (patch)
tree2f596ed664bb60c7154c61add363d5532bb0782f /lib/sqlalchemy/databases/mysql.py
parentc416dad6c652262bafbb137e6412054481db8e2f (diff)
downloadsqlalchemy-030ef1f0ef37ccaebde06e58f22cd0de5a74c5d0.tar.gz
for #516, moved the "disconnect check" step out of pool and back into base.py. dialects have
is_disconnect() method now. simpler design which also puts control of the ultimate "execute" call back into the hands of the dialects.
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 7ea98e92f..03297cd68 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -342,11 +342,8 @@ class MySQLDialect(ansisql.ANSIDialect):
except:
pass
- def get_disconnect_checker(self):
- def disconnect_checker(e):
- return isinstance(e, self.dbapi.OperationalError) and e.args[0] in (2006, 2014)
- return disconnect_checker
-
+ def is_disconnect(self, e):
+ return isinstance(e, self.dbapi.OperationalError) and e.args[0] in (2006, 2014)
def get_default_schema_name(self):
if not hasattr(self, '_default_schema_name'):