Created
October 7, 2015 09:30
-
-
Save rchavik/7618629b3149be79b7da to your computer and use it in GitHub Desktop.
mysqlnd_ms support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php | |
index a01cee6..6204755 100644 | |
--- a/lib/Cake/Model/Datasource/DboSource.php | |
+++ b/lib/Cake/Model/Datasource/DboSource.php | |
@@ -2304,6 +2304,7 @@ class DboSource extends DataSource { | |
if ($this->fullDebug) { | |
$this->logQuery('BEGIN'); | |
} | |
+ $this->_connection->setAttribute(PDO::ATTR_AUTOCOMMIT, false); | |
return $this->_transactionStarted = $this->_connection->beginTransaction(); | |
} | |
@@ -2338,7 +2339,9 @@ class DboSource extends DataSource { | |
$this->logQuery('COMMIT'); | |
} | |
$this->_transactionStarted = false; | |
- return $this->_connection->commit(); | |
+ $res = $this->_connection->commit(); | |
+ $this->_connection->setAttribute(PDO::ATTR_AUTOCOMMIT, true); | |
+ return $res; | |
} | |
if ($this->nestedTransactionSupported()) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment