Skip to content

Commit 0d6560d

Browse files
committed
AC-11995:Add compatibility with MySQL 8.4 LTS for Magento CE
1 parent 2fe3569 commit 0d6560d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

dev/tests/setup-integration/_files/Magento/TestSetupDeclarationModule1/fixture/declarative_installer/constraint_modification.mysql829.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
`bigint_not_default_not_nullable` bigint unsigned NOT NULL,
2727
`smallint_ref` smallint NOT NULL DEFAULT \'0\',
2828
PRIMARY KEY (`tinyint_ref`,`smallint_ref`),
29-
UNIQUE KEY `REFERENCE_TABLE_SMALLINT_REF` (`smallint_ref`)
29+
UNIQUE KEY `REFERENCE_TABLE_SMALLINT_REF` (`smallint_ref`),
30+
UNIQUE KEY `REFERENCE_TABLE_TINYINT_REF` (`tinyint_ref`)
3031
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
3132
'test_table' => 'CREATE TABLE `test_table` (
3233
`smallint` smallint DEFAULT NULL,

dev/tests/setup-integration/_files/Magento/TestSetupDeclarationModule1/revisions/constraint_modifications/db_schema.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
<constraint xsi:type="unique" referenceId="REFERENCE_TABLE_SMALLINT_REF">
3030
<column name="smallint_ref"/>
3131
</constraint>
32+
<constraint xsi:type="unique" referenceId="REFERENCE_TABLE_TINYINT_REF">
33+
<column name="tinyint_ref"/>
34+
</constraint>
3235
</table>
3336
<table name="auto_increment_test" resource="default">
3437
<column xsi:type="int" name="int_auto_increment_with_nullable" identity="true" padding="12" unsigned="true"

dev/tests/setup-integration/testsuite/Magento/Setup/DeclarativeInstallerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ public function testInstallationWithConstraintsModification()
208208
['Magento_TestSetupDeclarationModule1']
209209
);
210210
$this->updateDbSchemaRevision('constraint_modifications');
211-
$adapter = $this->resourceConnection->getConnection("default");
212-
$adapter->query("SET @OLD_RESTRICT_FK_ON_NON_STANDARD_KEY=@@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY, @@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY=0");
213211
$this->cliCommand->upgrade();
214212

215213
$diff = $this->schemaDiff->diff(
@@ -219,7 +217,6 @@ public function testInstallationWithConstraintsModification()
219217
self::assertNull($diff->getAll());
220218
$shardData = $this->describeTable->describeShard(Sharding::DEFAULT_CONNECTION);
221219
$this->assertTableCreationStatements($this->getTrimmedData(), $shardData);
222-
$adapter->query("SET @@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY=IF(@OLD_RESTRICT_FK_ON_NON_STANDARD_KEY=0, 0, 1)");
223220
}
224221

225222
/**

0 commit comments

Comments
 (0)