Roll back transaction which is currently in progress.
771121
def rollback(self):
        
        try:
            if self._autocommit:
                return

            if not self._conn or not self._conn.is_connected():
                return

            if not self._conn.tds72_transaction:
                return

            self._main_cursor._rollback(cont=True,
                                        isolation_level=self._isolation_level)
        except socket.error as e:
            if e.errno in (errno.ENETRESET, errno.ECONNRESET, errno.EPIPE):
                return
            self._conn.close()
            raise
        except ClosedConnectionError:
            pass
696611
def rollback(self):
        

        try:
            self.check_connection()
        except NullDatabaseConnectionError:
            return

        logger.debug("rollback: path='{}'".format(self.database_path))

        self.connection.rollback()
601278
public void rollback()
    {
        //  Remove incomplete message from the outbound pipe.
        Msg msg;
        if (outpipe != null) {
            while ((msg = outpipe.unwrite()) != null) {
                assert (msg.hasMore());
            }
        }
    }
1344488
def rollback_transaction(self):
        
        self._assert_open()
        if not self._transaction:
            raise TransactionError("No transaction to rollback")
        cx = self._connection
        if cx:
            metadata = {}
            try:
                cx.rollback(on_success=metadata.update)
            finally:
                self._disconnect(sync=True)
                self._transaction = None
759830
async def rollback_prepared(self, xid, *, is_prepared=True):
        """"""
        if not is_prepared:
            await self.execute("XA END '%s'" % xid)
        await self.execute("XA ROLLBACK '%s'" % xid)
147011
public function rollBack()
	{
		if ( $this->transactionCount < 1 ) {
			return;
		}
		$transaction = $this->unprepared( "ROLLBACK;" );
		if ( false !== $transaction ) {
			$this->transactionCount --;
		}
	}
697807
public void rollback(TransactionStatus status) throws TransactionException {

		Exception rollbackException = null;
		PlatformTransactionManager rollbackExceptionTransactionManager = null;

		MultiTransactionStatus multiTransactionStatus = (MultiTransactionStatus) status;

		for (PlatformTransactionManager transactionManager : reverse(transactionManagers)) {
			try {
				multiTransactionStatus.rollback(transactionManager);
			} catch (Exception ex) {
				if (rollbackException == null) {
					rollbackException = ex;
					rollbackExceptionTransactionManager = transactionManager;
				} else {
					LOGGER.warn("Rollback exception (" + transactionManager + ") " + ex.getMessage(), ex);
				}
			}
		}

		if (multiTransactionStatus.isNewSynchronization()) {
			synchronizationManager.clearSynchronization();
		}

		if (rollbackException != null) {
			throw new UnexpectedRollbackException("Rollback exception, originated at (" + rollbackExceptionTransactionManager
					+ ") " + rollbackException.getMessage(), rollbackException);
		}
	}
438983
@Override
    public void rollback() throws IllegalStateException, SecurityException, SystemException
    {

        try
        {
            Transaction tx = threadLocal.get();
            if (tx == null)
            {
                throw new IllegalStateException("Cannot locate a Transaction for rollback.");
            }

            if (log.isDebugEnabled())
                log.info("Rollback transaction:" + tx);

            tx.rollback();

        }
        finally
        {
            if (log.isDebugEnabled())
                log.info("Resetting after rollback.");
            threadLocal.set(null);
            timerThead.set(null);
        }
    }
1360655
public void rollbackTransaction() throws HibernateException
    {
        Transaction tx = threadTransaction.get();
        try
        {
            threadTransaction.set(null);
            if (tx != null && !tx.wasCommitted() && !tx.wasRolledBack())
            {
                tx.rollback();
            }
        }
        finally
        {
            closeSession();
        }
    }
1172729
def reset(self):
        
        try:
            self._con.reset()
            self._transaction = False
            self._setsession()
            self._usage = 0
        except Exception:
            try:
                self.reopen()
            except Exception:
                try:
                    self.rollback()
                except Exception:
                    pass
640155
def _reset(self, force=False):
        
        if not self._closed and (force or self._transaction):
            try:
                self.rollback()
            except Exception:
                pass
1332150
public void rollback() {
        log.debug("Performing rollback");
        while (!operationExecutors.isEmpty()) {
            CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop();
            try {
                rollbackOperation.rollback();
            } catch (Exception e) {
                throw new TransactionSystemException(
                        "Error occurred during rollback", e);
            }
        }
    }
794742
private void completePreparingTransaction(TransactionId transactionId) {
    // Change ownership of the transaction to the local node and set its state to ROLLING_BACK and then roll it back.
    completeTransaction(
        transactionId,
        TransactionState.PREPARING,
        info -> new TransactionInfo(localMemberId, TransactionState.ROLLING_BACK, info.participants),
        info -> info.state == TransactionState.ROLLING_BACK,
        (id, transactional) -> transactional.rollback(id))
        .whenComplete((result, error) -> {
          if (error != null) {
            error = Throwables.getRootCause(error);
            if (error instanceof TransactionException) {
              LOGGER.warn("Failed to complete transaction", error);
            } else {
              LOGGER.warn("Failed to roll back transaction " + transactionId);
            }
          }
        });
  }
1366589
public synchronized void rollbackToSavepoint() {

        if (isClosed) {
            return;
        }

        String name = (String) sessionContext.savepoints.getKey(0);

        database.txManager.rollbackSavepoint(this, 0);

        try {
            database.logger.writeToLog(this, getSavepointRollbackSQL(name));
        } catch (HsqlException e) {}
    }
706038
@Override
	public void rollback() throws TransactionManagementException {
		logger.entering(CLASSNAME, "rollback");
		try {
			if (userTran.getStatus() != Status.STATUS_NO_TRANSACTION) {
				userTran.rollback();
			}
			logger.log(Level.FINE, "javax.transaction.Status: {0}", userTran.getStatus());
		} catch (IllegalStateException e) {
			throw new TransactionManagementException(e);
		} catch (SecurityException e) {
			throw new TransactionManagementException(e);
		} catch (SystemException e) {
			throw new TransactionManagementException(e);
		}
		logger.exiting(CLASSNAME, "rollback");
	}
795596
public function rollBack()
    {
        if ( $this->link == null ) {
            $this->connect();
        }
        if ( $this->transactions == 1 ) {

            $this->transactions = 0;
            $this->link->rollBack();

        } else {
            --$this->transactions;
        }

    }
622349
public void rollback() throws SystemException {
        Transaction transaction = currentTransaction();
        if (transaction == null) {
            throw new IllegalStateException("No active transaction");
        }
        transaction.rollback();     
    }