Skip to content
Snippets Groups Projects
Commit 36088732 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #669794 by andypost, Josh Waihi, aspilicious, moshe weitzman, catch:...

- Patch #669794 by andypost, Josh Waihi, aspilicious, moshe weitzman, catch: use savepoints for nested transactions.
parent 1201676f
No related branches found
No related tags found
No related merge requests found
......@@ -896,6 +896,14 @@ public function rollback($savepoint_name = 'drupal_transaction', $type = NULL, $
if ($this->supportsTransactions()) {
parent::rollBack();
}
else {
// Log unsupported rollback.
$this->rollbackLogs[] = array(
'type' => 'database',
'message' => t('Explicit rollback failed: not supported on active connection.'),
'variables' => array(),
);
}
$this->logRollback();
}
......@@ -911,9 +919,6 @@ protected function logRollback() {
$logging_callback = $logging['callback'];
// Log the failed rollback.
call_user_func($logging_callback, 'database', 'Explicit rollback failed: not supported on active connection.', array(), $logging['error_severity']);
// Play back the logged errors to the specified logging callback post-
// rollback.
foreach ($this->rollbackLogs as $log_item) {
......
......@@ -265,6 +265,14 @@ public function rollback($savepoint_name = 'drupal_transaction', $type = NULL, $
if ($this->supportsTransactions()) {
PDO::rollBack();
}
else {
// Log unsupported rollback.
$this->rollbackLogs[] = array(
'type' => 'database',
'message' => t('Explicit rollback failed: not supported on active connection.'),
'variables' => array(),
);
}
$this->logRollback();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment