summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/config.sample.php8
-rw-r--r--lib/private/Setup/MySQL.php10
2 files changed, 10 insertions, 8 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 363bdabef0f..69567f0bce7 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -1234,8 +1234,12 @@ $CONFIG = array(
'sqlite.journal_mode' => 'DELETE',
/**
- * If this setting is set to true MySQL can handle 4 byte characters instead of
- * 3 byte characters
+ * If requirements are met (see below) this setting is set to true during setup
+ * and MySQL can handle 4 byte characters instead of 3 byte characters.
+ *
+ * If you want to convert a 3-byte setup into a 4-byte setup please run the
+ * migration command:
+ * ./occ db:convert-mysql-charset
*
* MySQL requires a special setup for longer indexes (> 767 bytes) which are
* needed:
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
index 3f3ad6d9589..8290d675500 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -38,12 +38,10 @@ class MySQL extends AbstractDatabase {
$connection = $this->connect(['dbname' => null]);
// detect mb4
- if (is_null($this->config->getValue('mysql.utf8mb4', null))) {
- $tools = new MySqlTools();
- if ($tools->supports4ByteCharset($connection)) {
- $this->config->setValue('mysql.utf8mb4', true);
- $connection = $this->connect();
- }
+ $tools = new MySqlTools();
+ if ($tools->supports4ByteCharset($connection)) {
+ $this->config->setValue('mysql.utf8mb4', true);
+ $connection = $this->connect();
}
$this->createSpecificUser($username, $connection);