Index: branches/wmf-deployment/maintenance/cleanupTable.inc |
— | — | @@ -87,6 +87,10 @@ |
88 | 88 | |
89 | 89 | protected function runTable( $table, $where, $callback ) { |
90 | 90 | $dbw = wfGetDB( DB_MASTER ); |
| 91 | + |
| 92 | + // Unbuffered queries, avoids OOM |
| 93 | + $dbw->bufferResults( false ); |
| 94 | + |
91 | 95 | $count = $dbw->selectField( $table, 'count(*)', '', __METHOD__ ); |
92 | 96 | $this->init( $count, $table ); |
93 | 97 | $this->output( "Processing $table..." ); |
— | — | @@ -98,8 +102,12 @@ |
99 | 103 | foreach( $result as $row ) { |
100 | 104 | call_user_func( $callback, $row ); |
101 | 105 | } |
| 106 | + |
102 | 107 | $this->output( "Finished $table... $this->updated of $this->processed rows updated\n" ); |
| 108 | + |
103 | 109 | $result->free(); |
| 110 | + |
| 111 | + $dbw->bufferResults( true ); |
104 | 112 | } |
105 | 113 | |
106 | 114 | protected function hexChar( $matches ) { |
Property changes on: branches/wmf-deployment/maintenance/cleanupTable.inc |
___________________________________________________________________ |
Name: svn:mergeinfo |
107 | 115 | + /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646 |
/trunk/phase3/maintenance/cleanupTable.inc:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,56711 |