fuel/fuel/core/classes/database/connection.php
public function rollback_transaction($rollback_all = true)
	{
		if ($this->_transaction_depth > 0)
		{
			if($rollback_all or $this->_transaction_depth == 1)
			{
				if($result = $this->driver_rollback())
				{
					$this->_transaction_depth = 0;
					$this->_in_transaction = false;
				}
			}
			else
			{
				$result = $this->rollback_savepoint($this->_transaction_depth - 1);
				// If savepoint is not supported it is not an error
				isset($result) or $result = true;

				$result and $this->_transaction_depth -- ;
			}
		}
		else
		{
			$result = false;
		}

		return $result;
	}
public function rollback_transaction($rollback_all = true)
	{
		if ($this->_transaction_depth > 0)
		{
			if($rollback_all or $this->_transaction_depth == 1)
			{
				if($result = $this->driver_rollback())
				{
					$this->_transaction_depth = 0;
					$this->_in_transaction = false;
				}
			}
			else
			{
				$result = $this->rollback_savepoint($this->_transaction_depth - 1);
				// If savepoint is not supported it is not an error
				isset($result) or $result = true;

				$result and $this->_transaction_depth -- ;
			}
		}
		else
		{
			$result = false;
		}

		return $result;
	}
public function rollback_transaction ( $ rollback_all = true ) { if ( $ this -> _transaction_depth > 0 ) { if ( $ rollback_all or $ this -> _transaction_depth == 1 ) { if ( $ result = $ this -> driver_rollback ( ) ) { $ this -> _transaction_depth = 0 ; $ this -> _in_transaction = false ; } } else { $ result = $ this -> rollback_savepoint ( $ this -> _transaction_depth - 1 ) ; // If savepoint is not supported it is not an error isset ( $ result ) or $ result = true ; $ result and $ this -> _transaction_depth -- ; } } else { $ result = false ; } return $ result ; }
Rollsback nested pending transaction queries.
Rollback to the current level uses SAVEPOINT,
it does not work if current RDBMS does not support them.
In this case system rollbacks all queries and closes the transaction

$db->rollback_transaction();

@param bool $rollback_all:
true  - rollback everything and close transaction;
false - rollback only current level

@return bool
Rollsback nested pending transaction queries . Rollback to the current level uses SAVEPOINT it does not work if current RDBMS does not support them . In this case system rollbacks all queries and closes the transaction