diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-15 22:12:27 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-15 22:12:27 +0000 |
commit | e4373460c53bd35701c23ac9ca447b0190612427 (patch) | |
tree | 3f860fe9601188dd519647bb55a6402d7852edf8 /includes/database | |
parent | 1fed2bf2600e75272d9cbc0090f4853459457966 (diff) | |
download | brdo-e4373460c53bd35701c23ac9ca447b0190612427.tar.gz brdo-e4373460c53bd35701c23ac9ca447b0190612427.tar.bz2 |
#715094 by Damien Tournoud: Fixed Transaction data need to be reset early in DatabaseConnection::popTransaction().
Diffstat (limited to 'includes/database')
-rw-r--r-- | includes/database/database.inc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index 016b90ba4..533e25046 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -972,6 +972,13 @@ abstract class DatabaseConnection extends PDO { if ($this->transactionLayers == 0) { if ($this->willRollback) { + // Reset the rollback status so that the next transaction starts clean. + $this->willRollback = FALSE; + + // Reset the error log. + $rollback_logs = $this->rollbackLogs; + $this->rollbackLogs = array(); + $logging = Database::getLoggingCallback(); $logging_callback = NULL; if (is_array($logging)) { @@ -994,16 +1001,10 @@ abstract class DatabaseConnection extends PDO { if (isset($logging_callback)) { // Play back the logged errors to the specified logging callback post- // rollback. - foreach ($this->rollbackLogs as $log_item) { + foreach ($rollback_logs as $log_item) { $logging_callback($log_item['type'], $log_item['message'], $log_item['variables'], $log_item['severity'], $log_item['link']); } } - - // Reset any scheduled rollback. - $this->willRollback = FALSE; - - // Reset the error logs. - $this->rollbackLogs = array(); } elseif ($this->supportsTransactions()) { parent::commit(); |