r56715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56714‎ | r56715 | r56716 >
Date:16:38, 21 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Live-hacked fix for cleanupTable.inc -- unbuffered results seem to screw with SELECT count(*), moved the unbuffered-ness to below the count query.
Modified paths:
  • /branches/wmf-deployment/maintenance/cleanupTable.inc (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/maintenance/cleanupTable.inc
@@ -88,13 +88,13 @@
8989 protected function runTable( $table, $where, $callback ) {
9090 $dbw = wfGetDB( DB_MASTER );
9191
92 - // Unbuffered queries, avoids OOM
93 - $dbw->bufferResults( false );
94 -
9592 $count = $dbw->selectField( $table, 'count(*)', '', __METHOD__ );
9693 $this->init( $count, $table );
9794 $this->output( "Processing $table..." );
9895
 96+ // Unbuffered queries, avoids OOM
 97+ $dbw->bufferResults( false );
 98+
9999 $tableName = $dbw->tableName( $table );
100100 $sql = "SELECT * FROM $tableName $where";
101101 $result = $dbw->query( $sql, __METHOD__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r56716Merge r56715 from wmf-deployment (Moved unbuffered-ness to below count query ...werdna16:41, 21 September 2009

Status & tagging log