Incorrect version comparison
authorAlexander Ebert <ebert@woltlab.com>
Thu, 9 Jan 2020 22:35:54 +0000 (23:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 9 Jan 2020 22:35:54 +0000 (23:35 +0100)
wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php

index 1b1b5a465d570a5afc808aea9680ab9464b9523f..6bee2a653f82fd7fcd152bf079836160f48526fd 100644 (file)
@@ -215,8 +215,15 @@ class SystemCheckPage extends AbstractPage {
                                $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mariadb']['10']) >= 0);
                        }
                }
-               else if (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']) >= 0) {
-                       $this->results['mysql']['result'] = true;
+               else {
+                       // For MySQL 8.0, MySQL 8.0.14+ is required
+                       // https://bugs.mysql.com/bug.php?id=88718
+                       if ($compareSQLVersion[0] === '5') {
+                               $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']['5']) >= 0);
+                       }
+                       else {
+                               $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']['8']) >= 0);
+                       }
                }
                
                // check innodb support