From 7150b26584eaafe98ab7e3dd726d7cce4d444b4c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 18 Mar 2005 04:22:05 +0000 Subject: [PATCH] Include function name for SQL statements dumped to debug log --- includes/Database.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index 23645514a3..64004f6181 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -274,17 +274,17 @@ class Database { $this->mLastQuery = $sql; - if ( $this->debug() ) { - $sqlx = substr( $sql, 0, 500 ); - $sqlx = wordwrap(strtr($sqlx,"\t\n",' ')); - wfDebug( "SQL: $sqlx\n" ); - } # Add a comment for easy SHOW PROCESSLIST interpretation if ( $fname ) { $commentedSql = "/* $fname */ $sql"; } else { $commentedSql = $sql; } + if ( $this->debug() ) { + $sqlx = substr( $commentedSql, 0, 500 ); + $sqlx = wordwrap(strtr($sqlx,"\t\n",' ')); + wfDebug( "SQL: $sqlx\n" ); + } # If DBO_TRX is set, start a transaction if ( ( $this->mFlags & DBO_TRX ) && !$this->trxLevel() && $sql != 'BEGIN' ) { -- 2.20.1