Skip to content
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

Tests: MDEV-29446 workaround: Ignore COLLATE clause in SHOW CREATE TABLE #4913

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion e107_tests/tests/unit/db_table_adminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,14 @@ public function testGet_current_table()

$result = $this->dta->get_current_table('core');

// MySQL 8.0+: Alias CHARSET=utf8mb3 to CHARSET=utf8
array_walk_recursive($result, function(&$element)
{
// MySQL 8.0+
// Alias CHARSET=utf8mb3 to CHARSET=utf8
$element = str_replace("CHARSET=utf8mb3", "CHARSET=utf8", $element);
// MariaDB 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2, 10.11.0
// Ignore COLLATE clause (https://jira.mariadb.org/browse/MDEV-29446)
$element = preg_replace("/ COLLATE=[^\s;]+/", "", $element);
});

$this->assertSame($expected, $result);
Expand Down