Skip to content

Commit 14d6877

Browse files
committed
AC-11995:Add compatibility with MySQL 8.4 LTS for Magento CE
1 parent ee82b54 commit 14d6877

File tree

1 file changed

+2
-2
lines changed
  • lib/internal/Magento/Framework/DB/Adapter/Pdo

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,8 +3083,8 @@ public function startSetup()
30833083
$this->rawQuery("SET SQL_MODE=''");
30843084
$this->rawQuery("SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0");
30853085
$this->rawQuery("SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'");
3086-
if(str_contains($this->sqlVersionProvider->getSqlVersion(), self::MYSQL_8_4_VERSION)) {
3087-
$this->rawQuery("SET @@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY=0");
3086+
if (str_contains($this->sqlVersionProvider->getSqlVersion(), self::MYSQL_8_4_VERSION)) {
3087+
$this->rawQuery("SET RESTRICT_FK_ON_NON_STANDARD_KEY=0");
30883088
}
30893089
return $this;
30903090
}

0 commit comments

Comments
 (0)