Index: includes/database/database.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/database.inc,v retrieving revision 1.111 diff -u -p -8 -r1.111 database.inc --- includes/database/database.inc 28 Mar 2010 12:00:17 -0000 1.111 +++ includes/database/database.inc 29 Mar 2010 02:04:48 -0000 @@ -963,34 +963,39 @@ abstract class DatabaseConnection extend } $this->query('ROLLBACK TO SAVEPOINT ' . $savepoint); return; } } 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(); } /** * Logs messages from rollback(). */ protected function logRollback() { $logging = Database::getLoggingCallback(); // If there is no callback defined. We can't do anything. if (!is_array($logging)) { return; } $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) { call_user_func($logging_callback, $log_item['type'], $log_item['message'], $log_item['variables'], $log_item['severity'], $log_item['link']); } // Reset the error logs. $this->rollbackLogs = array(); Index: includes/database/sqlite/database.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/sqlite/database.inc,v retrieving revision 1.29 diff -u -p -8 -r1.29 database.inc --- includes/database/sqlite/database.inc 28 Mar 2010 06:54:13 -0000 1.29 +++ includes/database/sqlite/database.inc 29 Mar 2010 02:04:48 -0000 @@ -260,16 +260,24 @@ class DatabaseConnection_sqlite extends break; } return; } } 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(); } public function pushTransaction($name) { if ($this->savepointSupport) { return parent::pushTransaction($name); } if (!$this->supportsTransactions()) {