From a44a6f50371873926b291913a9bb2e7f5c4fac1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20R=C3=A9gis=20Palmeira?= Date: Wed, 2 Oct 2019 00:04:06 -0300 Subject: [PATCH] FIX Transactions Supported If transaction is supported, the script should use the transaction. The parent begin, commit and rollback do none. --- Doctrine/DBAL/Driver/PDODblib/Connection.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doctrine/DBAL/Driver/PDODblib/Connection.php b/Doctrine/DBAL/Driver/PDODblib/Connection.php index 3e004d7..0713256 100644 --- a/Doctrine/DBAL/Driver/PDODblib/Connection.php +++ b/Doctrine/DBAL/Driver/PDODblib/Connection.php @@ -69,9 +69,9 @@ private function _pdoTransactionsSupported() { */ public function rollback() { if ($this->_pdoTransactionsSupported() === true) { - parent::rollback(); - } else { $this->exec('ROLLBACK TRANSACTION'); + } else { + parent::rollback(); } } @@ -80,9 +80,9 @@ public function rollback() { */ public function commit() { if ($this->_pdoTransactionsSupported() === true) { - parent::commit(); - } else { $this->exec('COMMIT TRANSACTION'); + } else { + parent::commit(); } } @@ -91,9 +91,9 @@ public function commit() { */ public function beginTransaction() { if ($this->_pdoTransactionsSupported() === true) { - parent::beginTransaction(); - } else { $this->exec('BEGIN TRANSACTION'); + } else { + parent::beginTransaction(); } }