From 8fa4c45bd68b6fdab881c6d60fc61a0ce4b981ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 28 Jul 2010 21:59:40 +0000 Subject: [PATCH] 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. --- includes/db/DatabaseMysql.php | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.20.1