Merge "Fix usage of $wgDebugDumpSql"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 7 Apr 2014 21:22:02 +0000 (21:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 7 Apr 2014 21:22:02 +0000 (21:22 +0000)
includes/db/DatabaseMssql.php
includes/db/LBFactory.php

index 50b7158..faed996 100644 (file)
@@ -164,8 +164,7 @@ class DatabaseMssql extends DatabaseBase {
         * @throws DBUnexpectedError
         */
        protected function doQuery( $sql ) {
-               global $wgDebugDumpSql;
-               if ( $wgDebugDumpSql ) {
+               if ( $this->debug() ) {
                        wfDebug( "SQL: [$sql]\n" );
                }
                $this->offset = 0;
index fcce870..eca9564 100644 (file)
@@ -243,7 +243,10 @@ class LBFactorySimple extends LBFactory {
                        global $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, $wgDBtype, $wgDebugDumpSql;
                        global $wgDBssl, $wgDBcompress;
 
-                       $flags = ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT;
+                       $flags = DBO_DEFAULT;
+                       if ( $wgDebugDumpSql ) {
+                               $flags |= DBO_DEBUG;
+                       }
                        if ( $wgDBssl ) {
                                $flags |= DBO_SSL;
                        }