mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1001 setup add check for new MySQL requirement innodb_large_prefix
if disabled indexes will be limited to 767 bytes, that means 191 car in the new iTop charset utf8mb4 although the varchar iTop use are 255 car long. So we NEED this parameter to be set to true (its default value is true only since MySQL 5.7.7, see https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_large_prefix) SVN:trunk[5442]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user