summaryrefslogtreecommitdiff
path: root/includes/database/mysql
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-12-31 16:09:02 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2011-12-31 16:09:02 -0800
commitd74306729631ead14323638108e3dcdf5f926517 (patch)
treec0b63517798f274f4c9404b245b0175f3cb08b65 /includes/database/mysql
parent8703bb7b3d83f79c3a1453f17a8f4eb9da9f442f (diff)
downloadbrdo-d74306729631ead14323638108e3dcdf5f926517.tar.gz
brdo-d74306729631ead14323638108e3dcdf5f926517.tar.bz2
Issue follow-up #1007830 by Damien Tournoud, basic: Fixed Nested transactions throw exceptions when they got out of scope.
Diffstat (limited to 'includes/database/mysql')
-rw-r--r--includes/database/mysql/database.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc
index a57f7dd02..e024a7f39 100644
--- a/includes/database/mysql/database.inc
+++ b/includes/database/mysql/database.inc
@@ -183,8 +183,11 @@ class DatabaseConnection_mysql extends DatabaseConnection {
// succeed for MySQL error code 1305 ("SAVEPOINT does not exist").
if ($e->errorInfo[1] == '1305') {
// If one SAVEPOINT was released automatically, then all were.
- // Therefore, we keep just the topmost transaction.
- $this->transactionLayers = array('drupal_transaction' => 'drupal_transaction');
+ // Therefore, clean the transaction stack.
+ $this->transactionLayers = array();
+ // We also have to explain to PDO that the transaction stack has
+ // been cleaned-up.
+ PDO::commit();
}
else {
throw $e;