r10240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10239‎ | r10240 | r10241 >
Date:14:05, 22 July 2005
Author:midom
Status:old
Tags:
Comment:
Commit live hacks:
* add function name to profiling name of sql queries
* change USE INDEX to FORCE INDEX, we use that where we really need to, so it won't hurt
Modified paths:
  • /trunk/phase3/includes/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Database.php
@@ -300,7 +300,7 @@
301301 if ( $wgProfiling ) {
302302 # generalizeSQL will probably cut down the query to reasonable
303303 # logging size most of the time. The substr is really just a sanity check.
304 - $profName = 'query: ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
 304+ $profName = 'query: ' . $fname . ' ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
305305 wfProfileIn( 'Database::query' );
306306 wfProfileIn( $profName );
307307 }
@@ -1120,7 +1120,7 @@
11211121 * PostgreSQL doesn't have them and returns ""
11221122 */
11231123 function useIndexClause( $index ) {
1124 - return "USE INDEX ($index)";
 1124+ return "FORCE INDEX ($index)";
11251125 }
11261126
11271127 /**

Status & tagging log