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

Commit

Permalink
II
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake committed Aug 30, 2023
1 parent 1d6db81 commit c97059c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
- name: Run tests ${{ matrix.test-args }}
continue-on-error: true
run: vendor/bin/phpunit -c core --color=always ${{ matrix.test-args }}

# run: vendor/bin/phpunit -c core --color=always ${{ matrix.test-args }}
run: vendor/bin/phpunit -c core --color=always modules/contrib/mysqli/tests/src/Kernel/mysqli/TransactionTest.php
# - uses: actions/upload-artifact@v3
# with:
# name: test-results
Expand Down
16 changes: 12 additions & 4 deletions src/Driver/Database/mysqli/TransactionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,24 @@ protected function releaseClientSavepoint(string $name): bool {
* {@inheritdoc}
*/
protected function rollbackClientTransaction(): bool {
return $this->connection->getClientConnection()->rollback();
$clientRollback = $this->connection->getClientConnection()->rollBack();
$this->setConnectionTransactionState($clientRollback ?
ClientConnectionTransactionState::RolledBack :
ClientConnectionTransactionState::RollbackFailed
);
return $clientRollback;
}

/**
* {@inheritdoc}
*/
protected function commitClientTransaction(): bool {
$success = $this->connection->getClientConnection()->commit();
dump([__METHOD__, $success]);
return $success;
$clientCommit = $this->connection->getClientConnection()->commit();
$this->setConnectionTransactionState($clientCommit ?
ClientConnectionTransactionState::Committed :
ClientConnectionTransactionState::CommitFailed
);
return $clientCommit;
}

}

0 comments on commit c97059c

Please sign in to comment.