diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-09 15:06:32 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-09 15:06:32 -0500 |
commit | 6f16b8db6f08cefd68cdf251292316497eb849b3 (patch) | |
tree | dd86ad7eb16671bfec3ea091f2b0cfd5b6e18893 /lib/sqlalchemy/dialects/mssql/adodbapi.py | |
parent | f473398f0170a00b0e760a7dba292087144c7e45 (diff) | |
download | sqlalchemy-6f16b8db6f08cefd68cdf251292316497eb849b3.tar.gz |
- add connection and cursor to is_disconnect(). We aren't using it yet,
but we'd like to. Most DBAPIs don't give us anything we can do with it.
Some research was done on psycopg2 and it still seems like they give us
no adequate method (tried connection.closed, cursor.closed, connection.status).
mxodbc claims their .closed attribute will work (but I am skeptical).
- remove beahvior in pool that auto-invalidated a connection when
the cursor failed to create. That's not the pool's job. we need the conn
for the error logic. Can't get any tests to fail, curious why that
behavior was there, guess we'll find out (or not).
- add support for psycopg2 version detection. even though we have
no use for it yet...
- adjust one of the reconnect tests to work with oracle's
horrendously slow connect speed
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql/adodbapi.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mssql/adodbapi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/adodbapi.py b/lib/sqlalchemy/dialects/mssql/adodbapi.py index 355214d89..f2d945de2 100644 --- a/lib/sqlalchemy/dialects/mssql/adodbapi.py +++ b/lib/sqlalchemy/dialects/mssql/adodbapi.py @@ -62,7 +62,7 @@ class MSDialect_adodbapi(MSDialect): connectors.append("Integrated Security=SSPI") return [[";".join (connectors)], {}] - def is_disconnect(self, e): + def is_disconnect(self, e, connection, cursor): return isinstance(e, self.dbapi.adodbapi.DatabaseError) and \ "'connection failure'" in str(e) |