From: tonythomas01 <01tonythomas@gmail.com> Date: Tue, 31 Dec 2013 07:07:57 +0000 (+0530) Subject: Remove version check for mysql 4.1 from Maintenance scripts X-Git-Tag: 1.31.0-rc.0~17441^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=b74f88967bf090af3df0efa45feada30f256978b;p=lhc%2Fweb%2Fwiklou.git Remove version check for mysql 4.1 from Maintenance scripts 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 --- diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index 4b04683554..7c6e7d4fdd 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -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; diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index e832b4e827..dd86619e75 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -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 ) {