Index: trunk/phase3/maintenance/updateCollation.php |
— | — | @@ -30,14 +30,18 @@ |
31 | 31 | global $wgCollationVersion, $wgContLang; |
32 | 32 | |
33 | 33 | $dbw = wfGetDB( DB_MASTER ); |
34 | | - $count = $dbw->estimateRowCount( |
| 34 | + $count = $dbw->selectField( |
35 | 35 | 'categorylinks', |
36 | | - array( 'cl_from', 'cl_to', 'cl_sortkey_prefix' ), |
| 36 | + 'COUNT(*)', |
37 | 37 | 'cl_collation != ' . $dbw->addQuotes( $wgCollationVersion ), |
38 | 38 | __METHOD__ |
39 | 39 | ); |
40 | 40 | |
41 | | - $this->output( "Fixing collation for around $count rows (estimate might be wrong).\n" ); |
| 41 | + if ( $count == 0 ) { |
| 42 | + $this->output( "Collations up-to-date.\n" ); |
| 43 | + return; |
| 44 | + } |
| 45 | + $this->output( "Fixing collation for $count rows.\n" ); |
42 | 46 | |
43 | 47 | $count = 0; |
44 | 48 | do { |