summaryrefslogtreecommitdiff
path: root/includes/database/sqlite
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-26 07:52:13 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-26 07:52:13 +0000
commit72db95c988c57d9ac1b073e9d8a587041d8906f0 (patch)
tree17ad2eb17f2b9b76bdaff14ac4bc0e0106680f0c /includes/database/sqlite
parent164ac036ac57868723db0b2789961419e92778c4 (diff)
downloadbrdo-72db95c988c57d9ac1b073e9d8a587041d8906f0.tar.gz
brdo-72db95c988c57d9ac1b073e9d8a587041d8906f0.tar.bz2
- Patch #711108 by Berdir: better exception reporting for watchdog() in the database system.
Diffstat (limited to 'includes/database/sqlite')
-rw-r--r--includes/database/sqlite/database.inc35
1 files changed, 1 insertions, 34 deletions
diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc
index ba28ca63b..98ffe32d6 100644
--- a/includes/database/sqlite/database.inc
+++ b/includes/database/sqlite/database.inc
@@ -210,7 +210,7 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
return (int) $this->query('SELECT value FROM {sequences}')->fetchField();
}
- public function rollback($savepoint_name = 'drupal_transaction', $type = NULL, $message = NULL, $variables = array(), $severity = NULL, $link = NULL) {
+ public function rollback($savepoint_name = 'drupal_transaction') {
if ($this->savepointSupport) {
return parent::rollBack($savepoint_name, $type, $message, $variables, $severity, $link);
}
@@ -224,29 +224,6 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
return;
}
- // Set the severity to the configured default if not specified.
- if (!isset($severity)) {
- $logging = Database::getLoggingCallback();
- if (is_array($logging)) {
- $severity = $logging['default_severity'];
- }
- }
-
- // Record in an array to send to the log after transaction rollback.
- // Messages written directly to a log (with a database back-end) will roll
- // back during the following transaction rollback. This is an array because
- // rollback could be requested multiple times during a transaction, and all
- // such errors ought to be logged.
- if (isset($message)) {
- $this->rollbackLogs[] = array(
- 'type' => $type,
- 'message' => $message,
- 'variables' => $variables,
- 'severity' => $severity,
- 'link' => $link,
- );
- }
-
// We need to find the point we're rolling back to, all other savepoints
// before are no longer needed.
while ($savepoint = array_pop($this->transactionLayers)) {
@@ -265,15 +242,6 @@ 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();
}
public function pushTransaction($name) {
@@ -313,7 +281,6 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
if ($this->willRollback) {
$this->willRollback = FALSE;
PDO::rollBack();
- $this->logRollback();
}
elseif (!PDO::commit()) {
throw new DatabaseTransactionCommitFailedException();