r108263 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108262‎ | r108263 | r108264 >
Date:18:23, 6 January 2012
Author:demon
Status:ok
Tags:
Comment:
(bug 32787) Add DB name to debug output. Based on patch by Solitarius
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -846,11 +846,9 @@
847847 $sqlx = substr( $commentedSql, 0, 500 );
848848 $sqlx = strtr( $sqlx, "\t\n", ' ' );
849849
850 - if ( $isMaster ) {
851 - wfDebug( "Query $cnt (master): $sqlx\n" );
852 - } else {
853 - wfDebug( "Query $cnt (slave): $sqlx\n" );
854 - }
 850+
 851+ $master = $isMaster ? 'master' : 'slave';
 852+ wfDebug( "Query {$this->mDBname} ($cnt) ($master): $sqlx\n" );
855853 }
856854
857855 if ( istainted( $sql ) & TC_MYSQL ) {

Status & tagging log