Remove version check for mysql 4.1 from Maintenance scripts
authortonythomas01 <01tonythomas@gmail.com>
Tue, 31 Dec 2013 07:07:57 +0000 (12:37 +0530)
committertonythomas01 <01tonythomas@gmail.com>
Tue, 31 Dec 2013 09:23:07 +0000 (14:53 +0530)
Removed version check for mysql from initEditCount.php and
storage/fixBug20757.php. Mediawiki needs MYSQL Ver 5.0.2 or
later, so the check is unnecessary.
Removed white spaces

Bug: 59126
Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7

maintenance/initEditCount.php
maintenance/storage/fixBug20757.php

index 4b04683..7c6e7d4 100644 (file)
@@ -47,7 +47,7 @@ in the load balancer, usually indicating a replication environment.' );
 
                // Autodetect mode...
                $backgroundMode = wfGetLB()->getServerCount() > 1 ||
-                       ( $dbw instanceof DatabaseMysql && version_compare( $dbver, '4.1' ) < 0 );
+                       ( $dbw instanceof DatabaseMysql );
 
                if ( $this->hasOption( 'background' ) ) {
                        $backgroundMode = true;
index e832b4e..dd86619 100644 (file)
@@ -57,14 +57,9 @@ class FixBug20757 extends Maintenance {
 
                $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ );
 
-               if ( $dbr->getType() == 'mysql'
-                       && version_compare( $dbr->getServerVersion(), '4.1.0', '>=' )
-               ) {
+               if ( $dbr->getType() == 'mysql' ) {
                        // In MySQL 4.1+, the binary field old_text has a non-working LOWER() function
                        $lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING latin1))';
-               } else {
-                       // No CONVERT() in MySQL 4.0
-                       $lowerLeft = 'LOWER(LEFT(old_text,22))';
                }
 
                while ( true ) {