diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-22 23:45:24 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-22 23:45:24 -0500 |
| commit | 0f0ce7c9b7c4b3a9f1329dfa9c42d0d69386d48f (patch) | |
| tree | d50620cff987eeb763c96bb24b7c62558dab95a7 /lib/sqlalchemy/dialects/mysql/base.py | |
| parent | 0c9eb439267fc48e38a1390acf0eaa34d939867a (diff) | |
| download | sqlalchemy-0f0ce7c9b7c4b3a9f1329dfa9c42d0d69386d48f.tar.gz | |
- recognize that do_rollback() and do_commit() work with a DBAPI connection,
whereas the other do_rollback_twophase(), savepoint etc. work with
:class:`.Connection`. the context on these are different as twophase/savepoint
are available at the :class:`.Connection` level, whereas commit/rollback are needed
at a lower level as well. Rename the argument to "dbapi_connection" when the conneciton
is in fact the DBAPI interface.
- start thinking about being able to track "autocommit" vs. "commit", but not sure
we have a need for this yet.
- have Pool call out to a Dialect for all rollback/commit/close operations now. Pool
no longer calls DBAPI methods directly. May use this for a workaround for [ticket:2611]
- add a new Pool event reset() to allow the pool's reset of the connection to be intercepted.
- remove methods in Informix dialect which appear to be hardcoding some isolation
settings on new Transaction only; the isolation API should be implemented for Informix.
also removed "flag" for transaction commit/rollback being not available; this should
be based on server/DBAPI version and we will need someone with test access in order
to help determine how this should work
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index dc2ae7515..2cda1a147 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1933,7 +1933,7 @@ class MySQLDialect(default.DefaultDialect): cursor.close() return val.upper().replace("-", " ") - def do_commit(self, connection): + def do_commit(self, dbapi_connection): """Execute a COMMIT.""" # COMMIT/ROLLBACK were introduced in 3.23.15. @@ -1942,7 +1942,7 @@ class MySQLDialect(default.DefaultDialect): # Ignore commit/rollback if support isn't present, otherwise even basic # operations via autocommit fail. try: - connection.commit() + dbapi_connection.commit() except: if self.server_version_info < (3, 23, 15): args = sys.exc_info()[1].args @@ -1950,11 +1950,11 @@ class MySQLDialect(default.DefaultDialect): return raise - def do_rollback(self, connection): + def do_rollback(self, dbapi_connection): """Execute a ROLLBACK.""" try: - connection.rollback() + dbapi_connection.rollback() except: if self.server_version_info < (3, 23, 15): args = sys.exc_info()[1].args |
