diff options
-rw-r--r-- | includes/database/database.inc | 11 | ||||
-rw-r--r-- | includes/database/sqlite/database.inc | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index ab2b5829c..a85489a5b 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -896,6 +896,14 @@ abstract class DatabaseConnection extends PDO { 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 @@ abstract class DatabaseConnection extends PDO { $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) { diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index da3ca3525..ba28ca63b 100644 --- a/includes/database/sqlite/database.inc +++ b/includes/database/sqlite/database.inc @@ -265,6 +265,14 @@ class DatabaseConnection_sqlite extends DatabaseConnection { 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(); } |