def restore_commit_mode(self, commit_mode):

        (autocommit, isolation_level) = commit_mode

        self.conn.autocommit = autocommit
        self.conn.set_isolation_level(isolation_level)
MySQL implicitly rolls back savepoints when it deadlocks (#22291).
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/abstract_ingester/ingest_db_wrapper.py/IngestDBWrapper.restore_commit_mode--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/transactions/tests.py/AtomicMySQLTests.test_implicit_savepoint_rollback