• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/mysqlcommonconnection.php
  • Класс: BitrixMainDBMysqlCommonConnection
  • Вызов: MysqlCommonConnection::rollbackTransaction
public function rollbackTransaction()
{
	$this->transactionLevel--;

	if ($this->transactionLevel < 0)
	{
		throw new TransactionException('Transaction was not started.');
	}

	if ($this->transactionLevel == 0)
	{
		$this->query("ROLLBACK");
	}
	else
	{
		$this->query("ROLLBACK TO SAVEPOINT TRANS{$this->transactionLevel}");

		throw new TransactionException('Nested rollbacks are unsupported.');
	}
}