Use binary charset in default table options
authorTim Starling <tstarling@wikimedia.org>
Wed, 19 Sep 2018 05:38:28 +0000 (15:38 +1000)
committerTim Starling <tstarling@wikimedia.org>
Wed, 19 Sep 2018 05:56:10 +0000 (15:56 +1000)
$wgDBTableOptions is overridden in the installer-generated
LocalSettings.php, and is always set to binary now that the installer UI
option has been removed. However, the value from DefaultSettings.php is
used when the installer installs an extension, since in this case
DatabaseUpdater is called without reading the generated
LocalSettings.php.

Binary is almost certainly the right answer since many extensions can't
even be installed without this option, they hit a key length error.

Change-Id: I87df736a4d9e49c9535d55bd556e636500ca203f

includes/DefaultSettings.php

index ab67225..6515083 100644 (file)
@@ -1931,7 +1931,7 @@ $wgDBprefix = '';
 /**
  * MySQL table options to use during installation or update
  */
-$wgDBTableOptions = 'ENGINE=InnoDB';
+$wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
 
 /**
  * SQL Mode - default is turning off all modes, including strict, if set.