Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
IX
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake committed Aug 31, 2023
1 parent c8f9180 commit a20f67d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Driver/Database/mysqli/TransactionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function rollbackClientSavepoint(string $name): bool {
// because the transaction is no longer active. In this case we rollback
// to root and cleanup.
$this->connection->getClientConnection()->rollBack();
$this->resetStack();
// $this->resetStack();
$this->setConnectionTransactionState(ClientConnectionTransactionState::Voided);
$this->processPostTransactionCallbacks();
return TRUE;
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Kernel/mysqli/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public function testTransactionWithDdlStatement() {
try {
// Rollback the outer transaction.
$transaction->rollBack();
// @see \Drupal\mysql\Driver\Database\mysql\Connection::rollBack()
// @todo mysqli does not fail when rolling back and no transaction active.
// $this->fail('Rolling back a transaction containing DDL should produce a warning.');
// Note: Difference from MySQL.
// MySQLi does not fail when rolling back and no transaction active.
// $this->fail('Rolling back a transaction containing DDL should produce a warning.');
}
catch (Warning $warning) {
$this->assertSame('Rollback attempted when there is no active transaction. This can cause data integrity issues.', $warning->getMessage());
Expand Down

0 comments on commit a20f67d

Please sign in to comment.