From fd7d30333fcf342ed5bf9e693c0e47a9d95579a0 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 16 Mar 2018 09:58:44 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01001=20setup=20add=20check=20for=20new?= =?UTF-8?q?=20MySQL=20requirement=20innodb=5Flarge=5Fprefix=20if=20disable?= =?UTF-8?q?d=20indexes=20will=20be=20limited=20to=20767=20bytes,=20that=20?= =?UTF-8?q?means=20191=20car=20in=20the=20new=20iTop=20charset=20utf8mb4?= =?UTF-8?q?=20although=20the=20varchar=20iTop=20use=20are=20255=20car=20lo?= =?UTF-8?q?ng.=20So=20we=20NEED=20this=20parameter=20to=20be=20set=20to=20?= =?UTF-8?q?true=20(its=20default=20value=20is=20true=20only=20since=20MySQ?= =?UTF-8?q?L=205.7.7,=20see=20https://dev.mysql.com/doc/refman/5.7/en/inno?= =?UTF-8?q?db-parameters.html#sysvar=5Finnodb=5Flarge=5Fprefix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[5442] --- setup/setuputils.class.inc.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 9b1c838c0..62e92fa12 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -1171,7 +1171,6 @@ EOF $aResult['checks'][] = new CheckResult(CheckResult::INFO, "Info - User privileges: ".($oDBSource->GetRawPrivileges())); $bHasDbVersionRequired = self::CheckDbServerVersion($aResult, $oDBSource); - if ($bHasDbVersionRequired) { // Check some server variables @@ -1185,6 +1184,7 @@ EOF { $aResult['checks'][] = new CheckResult(CheckResult::WARNING, "MySQL server's max_allowed_packet ($iMaxAllowedPacket) is not big enough. Please, consider setting it to at least ".(500 + $iMaxUploadSize)."."); } + $iMaxConnections = $oDBSource->GetServerVariable('max_connections'); if ($iMaxConnections < 5) { @@ -1194,6 +1194,19 @@ EOF { $aResult['checks'][] = new CheckResult(CheckResult::INFO, "MySQL server's max_connections is set to $iMaxConnections."); } + + $iInnodbLargePrefix = $oDBSource->GetServerVariable('innodb_large_prefix'); + $bInnodbLargePrefix = ($iInnodbLargePrefix == 1); + if (!$bInnodbLargePrefix) + { + $aResult['checks'][] = new CheckResult(CheckResult::ERROR, + "MySQL variable innodb_large_prefix is set to false, but must be set to true ! Otherwise this will limit indexes size and cause issues (iTop charset is utf8mb4)."); + } + else + { + $aResult['checks'][] = new CheckResult(CheckResult::INFO, + "MySQL innodb_large_prefix is active, so the iTop charset utf8mb4 can be used."); + } } try