Explicitly set mysql charsets to binary if not using utf-8 schema.
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 28 Jul 2010 21:59:40 +0000 (21:59 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 28 Jul 2010 21:59:40 +0000 (21:59 +0000)
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

index 7e93734..b326434 100644 (file)
@@ -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;