Commit 36088732 authored by Dries's avatar Dries

- 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
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment