Index: trunk/phase3/maintenance/rebuildrecentchanges.inc |
— | — | @@ -49,7 +49,8 @@ |
50 | 50 | $dbw->query( $sql ); |
51 | 51 | |
52 | 52 | $sql = "SELECT rc_timestamp FROM $recentchanges " . |
53 | | - "ORDER BY rc_timestamp DESC" . $dbw->limitResult( 1, 5000 ); |
| 53 | + "ORDER BY rc_timestamp DESC"; |
| 54 | + $sql = $dbw->limitResult($sql, 1, 5000 ); |
54 | 55 | $res = $dbw->query( $sql ); |
55 | 56 | $obj = $dbw->fetchObject( $res ); |
56 | 57 | if( $obj ) { |
Index: trunk/phase3/maintenance/convertLinks.inc |
— | — | @@ -102,7 +102,8 @@ |
103 | 103 | performanceLog( "rows inserted vs seconds elapsed:\n" ); |
104 | 104 | |
105 | 105 | for ($rowOffset = $initialRowOffset; $rowOffset < $numRows; $rowOffset += $linksConvInsertInterval) { |
106 | | - $sqlRead = "SELECT * FROM $links ".$dbw->limitResult($linksConvInsertInterval,$rowOffset); |
| 106 | + $sqlRead = "SELECT * FROM $links "; |
| 107 | + $sqlRead = $dbw->limitResult($sqlRead, $linksConvInsertInterval,$rowOffset); |
107 | 108 | $res = $dbw->query($sqlRead); |
108 | 109 | if ( $noKeys ) { |
109 | 110 | $sqlWrite = array("INSERT INTO $links_temp (l_from,l_to) VALUES "); |