From: Niklas Laxström Date: Wed, 28 Jul 2010 21:59:40 +0000 (+0000) Subject: Explicitly set mysql charsets to binary if not using utf-8 schema. X-Git-Tag: 1.31.0-rc.0~35856 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=8fa4c45bd68b6fdab881c6d60fc61a0ce4b981ef;p=lhc%2Fweb%2Fwiklou.git Explicitly set mysql charsets to binary if not using utf-8 schema. Apparently some distros are setting utf-8 as the default, which would cause sql query errors if not using utf-8 schema. --- diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 7e93734f79..b3264345c5 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -112,6 +112,8 @@ class DatabaseMysql extends DatabaseBase { global $wgDBmysql5; if( $wgDBmysql5 ) { $this->query( 'SET NAMES utf8', __METHOD__ ); + } else { + $this->query( 'SET NAMES binary', __METHOD__ ); } // Set SQL mode, default is turning them all off, can be overridden or skipped with null global $wgSQLMode;