diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-08-26 21:32:11 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-08-26 21:32:11 +0000 |
commit | 47332cb1477f6a5affb5b78bb8aff0523c499d90 (patch) | |
tree | d67238c6b5b30236e62d7ce8494cb110c3f44601 /lib/sqlalchemy/engine/base.py | |
parent | 3188bd0567ffc4b17ff7ccb45abeb163fc9a1095 (diff) | |
download | sqlalchemy-47332cb1477f6a5affb5b78bb8aff0523c499d90.tar.gz |
- changed "invalidate" semantics with pooled connection; will
instruct the underlying connection record to reconnect the next
time its called. "invalidate" will also automatically be called
if any error is thrown in the underlying call to connection.cursor().
this will hopefully allow the connection pool to reconnect to a
database that had been stopped and started without restarting
the connecting application [ticket:121]
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 6a96fbcfb..ce6cc7d82 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -342,7 +342,8 @@ class Connection(Connectable): try: self.__engine.dialect.do_executemany(c, statement, parameters, context=context) except Exception, e: - self._rollback_impl() + self._autorollback() + #self._rollback_impl() if self.__close_with_result: self.close() raise exceptions.SQLError(statement, parameters, e) |