correctly with the "mysqldb" dialect. Previously,
the reconnect logic would fail for OperationalError
conditions, however since MySQLdb has its
own reconnect feature, there was no symptom
here unless one watched the logs.
[ticket:1848]
naming/typing information about the entities
the Query will return. Can be helpful for
building GUIs on top of ORM queries.
+
+- mysql
+
+ - The _extract_error_code() method now works
+ correctly with the "mysqldb" dialect. Previously,
+ the reconnect logic would fail for OperationalError
+ conditions, however since MySQLdb has its
+ own reconnect feature, there was no symptom
+ here unless one watched the logs.
+ [ticket:1848]
0.6.2
=====
def _extract_error_code(self, exception):
try:
- return exception.orig.args[0]
+ return exception.args[0]
except AttributeError:
+ # this AttributeError is likely unnecessary,
+ # but would need to confirm against MySQLdb code
return None
def _detect_charset(self, connection):
return conn
def shutdown(self):
+ # TODO: this doesn't cover all cases
+ # as nicely as we'd like, namely MySQLdb.
+ # would need to implement R. Brewer's
+ # proxy server idea to get better
+ # coverage.
for c in list(self.connections):
c.close()
self.connections = []