diff --git a/src/Driver/Database/mysqli/Connection.php b/src/Driver/Database/mysqli/Connection.php index 1e37c0c..1c62269 100644 --- a/src/Driver/Database/mysqli/Connection.php +++ b/src/Driver/Database/mysqli/Connection.php @@ -220,4 +220,11 @@ protected function driverTransactionManager(): TransactionManagerInterface { return new TransactionManager($this); } + /** + * {@inheritdoc} + */ + public function startTransaction($name = '') { + return $this->transactionManager()->push($name); + } + } diff --git a/src/Driver/Database/mysqli/TransactionManager.php b/src/Driver/Database/mysqli/TransactionManager.php index c6798b2..e76b287 100644 --- a/src/Driver/Database/mysqli/TransactionManager.php +++ b/src/Driver/Database/mysqli/TransactionManager.php @@ -9,11 +9,6 @@ /** * MySqli implementation of TransactionManagerInterface. - * - * MySQL will automatically commit transactions when tables are altered or - * created (DDL transactions are not supported). However, pdo_mysql tracks - * whether a client connection is still active and we can prevent triggering - * exceptions. */ class TransactionManager extends TransactionManagerBase { @@ -24,6 +19,13 @@ protected function beginClientTransaction(): bool { return $this->connection->getClientConnection()->begin_transaction(); } + /** + * {@inheritdoc} + */ + protected function addClientSavepoint(string $name): bool { + return $this->connection->getClientConnection()->savepoint($name); + } + /** * {@inheritdoc} */