Index: branches/wmf-deployment/maintenance/cleanupTable.inc |
— | — | @@ -88,13 +88,13 @@ |
89 | 89 | protected function runTable( $table, $where, $callback ) { |
90 | 90 | $dbw = wfGetDB( DB_MASTER ); |
91 | 91 | |
92 | | - // Unbuffered queries, avoids OOM |
93 | | - $dbw->bufferResults( false ); |
94 | | - |
95 | 92 | $count = $dbw->selectField( $table, 'count(*)', '', __METHOD__ ); |
96 | 93 | $this->init( $count, $table ); |
97 | 94 | $this->output( "Processing $table..." ); |
98 | 95 | |
| 96 | + // Unbuffered queries, avoids OOM |
| 97 | + $dbw->bufferResults( false ); |
| 98 | + |
99 | 99 | $tableName = $dbw->tableName( $table ); |
100 | 100 | $sql = "SELECT * FROM $tableName $where"; |
101 | 101 | $result = $dbw->query( $sql, __METHOD__ ); |