function TransactionManager::rollbackClientTransaction
Rolls back a client transaction.
Return value
bool Returns TRUE on success or FALSE on failure.
Overrides TransactionManagerBase::rollbackClientTransaction
File
-
core/
modules/ mysqli/ src/ Driver/ Database/ mysqli/ TransactionManager.php, line 58
Class
- TransactionManager
- MySqli implementation of TransactionManagerInterface.
Namespace
Drupal\mysqli\Driver\Database\mysqliCode
protected function rollbackClientTransaction() : bool {
// Note: mysqli::rollback() returns TRUE if there's no active transaction.
// This is diverging from PDO MySql. A PHP bug report exists.
// @see https://bugs.php.net/bug.php?id=81533.
$clientRollback = $this->connection
->getClientConnection()
->rollBack();
$this->setConnectionTransactionState($clientRollback ? ClientConnectionTransactionState::RolledBack : ClientConnectionTransactionState::RollbackFailed);
return $clientRollback;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.