From 6d93cb74888ae0da0d2286ca1cd82179ea367513 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Fri, 3 Feb 2017 16:24:22 +0100 Subject: Fix mysql settings --- config/config.sample.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'config/config.sample.php') diff --git a/config/config.sample.php b/config/config.sample.php index 84b98550fb0..363bdabef0f 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1241,9 +1241,9 @@ $CONFIG = array( * needed: * * [mysqld] - * innodb_large_prefix=true - * innodb_file_format=barracuda - * innodb_file_per_table=true + * innodb_large_prefix=ON + * innodb_file_format=Barracuda + * innodb_file_per_table=ON * * Tables will be created with * * character set: utf8mb4 @@ -1256,8 +1256,6 @@ $CONFIG = array( * https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_large_prefix * http://www.tocker.ca/2013/10/31/benchmarking-innodb-page-compression-performance.html * http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/ - * - * WARNING: EXPERIMENTAL */ 'mysql.utf8mb4' => false, -- cgit v1.2.3 From 86ccc8949f27f69f7ad895d345561567512a223a Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Tue, 21 Mar 2017 13:08:14 +0100 Subject: MySQL 4 byte is now detected during setup in any case. config.sample.php was updated to explicitly state that there detection in place to set mysql.utf8mb4 --- config/config.sample.php | 8 ++++++-- lib/private/Setup/MySQL.php | 10 ++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'config/config.sample.php') 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); -- cgit v1.2.3 From 99d60f43dcd1decb9a3cbd17270842617af6fbcd Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 23 Mar 2017 11:12:58 +0100 Subject: config.sample.php doc update for MySQL 4-Byte unicode --- config/config.sample.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'config/config.sample.php') diff --git a/config/config.sample.php b/config/config.sample.php index 69567f0bce7..c0e897a8451 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1234,13 +1234,16 @@ $CONFIG = array( 'sqlite.journal_mode' => 'DELETE', /** - * If requirements are met (see below) this setting is set to true during setup + * During setup, if requirements are met (see below), this setting is set to true * 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 - * + * If you want to convert an existing 3-byte setup into a 4-byte setup please + * set the parameters in MySQL as mentioned below run the migration command: + * ./occ db:convert-mysql-charset + * The config setting will be set automatically after a successful run. + * + * Consult the documentation for more details. + * * MySQL requires a special setup for longer indexes (> 767 bytes) which are * needed: * -- cgit v1.2.3 From 3afad7fe407ad6c5ef772d0e89f3f3cc06111a36 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 8 May 2017 11:34:47 +0200 Subject: Fix docs Signed-off-by: Joas Schilling --- config/config.sample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/config.sample.php') diff --git a/config/config.sample.php b/config/config.sample.php index c0e897a8451..aa0be98d8f7 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1238,7 +1238,7 @@ $CONFIG = array( * and MySQL can handle 4 byte characters instead of 3 byte characters. * * If you want to convert an existing 3-byte setup into a 4-byte setup please - * set the parameters in MySQL as mentioned below run the migration command: + * set the parameters in MySQL as mentioned below and run the migration command: * ./occ db:convert-mysql-charset * The config setting will be set automatically after a successful run. * -- cgit v1.2.3