throw new \RuntimeException($message);
}
+
+$sqlVersion = WCF::getDB()->getVersion();
+$compareSQLVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion);
+if (\stripos($sqlVersion, 'MariaDB') !== false) {
+ $neededSqlVersion = '10.5.12';
+ $sqlFork = 'MariaDB';
+} else {
+ $sqlFork = 'MySQL';
+ $neededSqlVersion = '8.0.29';
+}
+
+if (!\version_compare($compareSQLVersion, $neededSqlVersion, '>=')) {
+ if (WCF::getLanguage()->getFixedLanguageCode() === 'de') {
+ $message = "Ihre {$sqlFork}-Version '{$sqlVersion}' ist unzureichend für die Installation dieser Software. {$sqlFork}-Version {$neededSqlVersion} oder höher wird benötigt.";
+ } else {
+ $message = "Your {$sqlFork} version '{$sqlVersion}' is insufficient for installation of this software. {$sqlFork} version {$neededSqlVersion} or greater is required.";
+ }
+
+ throw new \RuntimeException($message);
+}
$sqlVersion = WCF::getDB()->getVersion();
$compareSQLVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion);
if (\stripos($sqlVersion, 'MariaDB') !== false) {
- $neededSqlVersion = '10.1.44';
+ $neededSqlVersion = '10.5.12';
$sqlFork = 'MariaDB';
} else {
$sqlFork = 'MySQL';
- if ($compareSQLVersion[0] === '5') {
- $neededSqlVersion = '5.7.31';
- } else {
- $neededSqlVersion = '8.0.19';
- }
+ $neededSqlVersion = '8.0.29';
}
if (!\version_compare($compareSQLVersion, $neededSqlVersion, '>=')) {
public $mysqlVersions = [
'mysql' => [
- '5' => '5.7.31',
- '8' => '8.0.19',
+ '8' => '8.0.29',
],
'mariadb' => [
- '10' => '10.1.44',
+ '10' => '10.5.12',
],
];
// work-around for older MySQL versions that don't know utf8mb4
case 1115:
- throw new SystemException("Insufficient MySQL version. Version '5.7.31' or greater is needed.");
+ throw new SystemException("Insufficient MySQL version. Version '8.0.29' or greater is needed.");
break;
default:
$sqlVersion = $db->getVersion();
$compareSQLVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion);
if (\stripos($sqlVersion, 'MariaDB')) {
- if (!(\version_compare($compareSQLVersion, '10.1.44') >= 0)) {
- throw new SystemException("Insufficient MariaDB version '" . $compareSQLVersion . "'. Version '10.1.44' or greater is needed.");
+ if (!(\version_compare($compareSQLVersion, '10.5.12') >= 0)) {
+ throw new SystemException("Insufficient MariaDB version '" . $compareSQLVersion . "'. Version '10.5.12' or greater is needed.");
}
} else {
- if ($compareSQLVersion[0] === '8') {
- // MySQL 8.0.19+
- if (!(\version_compare($compareSQLVersion, '8.0.19') >= 0)) {
- throw new SystemException("Insufficient MySQL version '" . $compareSQLVersion . "'. Version '5.7.31' or greater, or version '8.0.19' or greater is needed.");
- }
- } elseif (!(\version_compare($compareSQLVersion, '5.7.31') >= 0)) {
- // MySQL 5.7.31+
- throw new SystemException("Insufficient MySQL version '" . $compareSQLVersion . "'. Version '5.7.31' or greater, or version '8.0.19' or greater is needed.");
+ if (!(\version_compare($compareSQLVersion, '8.0.29') >= 0)) {
+ throw new SystemException("Insufficient MySQL version '" . $compareSQLVersion . "'. Version '8.0.29' or greater is needed.");
}
}
'en' => 'MySQL Requirements'
],
'mysql_version' => [
- 'de' => 'Bitte stellen Sie sicher, dass MySQL 5.7.31+/MySQL 8.0.19+ oder MariaDB 10.1.44+ mit InnoDB-Unterstützung vorhanden ist.',
- 'en' => 'Please make sure that MySQL 5.7.31+/MySQL 8.0.19+ or MariaDB 10.1.44+, with InnoDB support is available.'
+ 'de' => 'Bitte stellen Sie sicher, dass MySQL 8.0.29+ oder MariaDB 10.5.12+ mit InnoDB-Unterstützung vorhanden ist.',
+ 'en' => 'Please make sure that MySQL 8.0.29+ or MariaDB 10.5.12+, with InnoDB support is available.'
],
'result' => [
'de' => 'Ergebnis',