-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add MariaDB 10.7 to the build matrix #5327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,15 +220,13 @@ public function testColumnCharset(): void | |
| { | ||
| $table = new Table('test_column_charset'); | ||
| $table->addColumn('id', 'integer'); | ||
| $table->addColumn('no_charset', 'text'); | ||
| $table->addColumn('foo', 'text')->setPlatformOption('charset', 'ascii'); | ||
| $table->addColumn('bar', 'text')->setPlatformOption('charset', 'latin1'); | ||
| $this->schemaManager->dropAndCreateTable($table); | ||
|
|
||
| $columns = $this->schemaManager->listTableColumns('test_column_charset'); | ||
|
|
||
| self::assertFalse($columns['id']->hasPlatformOption('charset')); | ||
| self::assertEquals('utf8', $columns['no_charset']->getPlatformOption('charset')); | ||
| self::assertEquals('ascii', $columns['foo']->getPlatformOption('charset')); | ||
| self::assertEquals('latin1', $columns['bar']->getPlatformOption('charset')); | ||
| } | ||
|
|
@@ -280,12 +278,12 @@ public function testColumnCharsetChange(): void | |
| public function testColumnCollation(): void | ||
| { | ||
| $table = new Table('test_collation'); | ||
| $table->addOption('collate', $collation = 'latin1_swedish_ci'); | ||
| $table->addOption('collate', 'latin1_swedish_ci'); | ||
| $table->addOption('charset', 'latin1'); | ||
| $table->addColumn('id', 'integer'); | ||
| $table->addColumn('text', 'text'); | ||
| $table->addColumn('foo', 'text')->setPlatformOption('collation', 'latin1_swedish_ci'); | ||
| $table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8_general_ci'); | ||
| $table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8mb4_general_ci'); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the documentation:
In order to test schema introspection, we should use a charset that isn't an alias so that it's introspected as is. |
||
| $table->addColumn('baz', 'text')->setPlatformOption('collation', 'binary'); | ||
| $this->schemaManager->dropAndCreateTable($table); | ||
|
|
||
|
|
@@ -294,7 +292,7 @@ public function testColumnCollation(): void | |
| self::assertArrayNotHasKey('collation', $columns['id']->getPlatformOptions()); | ||
| self::assertEquals('latin1_swedish_ci', $columns['text']->getPlatformOption('collation')); | ||
| self::assertEquals('latin1_swedish_ci', $columns['foo']->getPlatformOption('collation')); | ||
| self::assertEquals('utf8_general_ci', $columns['bar']->getPlatformOption('collation')); | ||
| self::assertEquals('utf8mb4_general_ci', $columns['bar']->getPlatformOption('collation')); | ||
| self::assertInstanceOf(BlobType::class, $columns['baz']->getType()); | ||
| } | ||
|
|
||
|
|
@@ -525,9 +523,9 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void | |
| CREATE TABLE test_table_metadata( | ||
| col1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY | ||
| ) | ||
| COLLATE utf8_general_ci | ||
| COLLATE utf8mb4_general_ci | ||
| ENGINE InnoDB | ||
| ROW_FORMAT COMPRESSED | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This causes the following error on MariaDB 10.7:
When testing schema introspection, we don't care about the specific value of the row format, so we can use any other valid value. |
||
| ROW_FORMAT DYNAMIC | ||
| COMMENT 'This is a test' | ||
| AUTO_INCREMENT=42 | ||
| PARTITION BY HASH (col1) | ||
|
|
@@ -537,11 +535,11 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void | |
| $onlineTable = $this->schemaManager->listTableDetails('test_table_metadata'); | ||
|
|
||
| self::assertEquals('InnoDB', $onlineTable->getOption('engine')); | ||
| self::assertEquals('utf8_general_ci', $onlineTable->getOption('collation')); | ||
| self::assertEquals('utf8mb4_general_ci', $onlineTable->getOption('collation')); | ||
| self::assertEquals(42, $onlineTable->getOption('autoincrement')); | ||
| self::assertEquals('This is a test', $onlineTable->getOption('comment')); | ||
| self::assertEquals([ | ||
| 'row_format' => 'COMPRESSED', | ||
| 'row_format' => 'DYNAMIC', | ||
| 'partitioned' => true, | ||
| ], $onlineTable->getOption('create_options')); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion was removed in #4644 as well. In this test, we don't care what charset the database uses by default.