PT-2141 fix tests for pt-archiver (#581)

* PT-2141 Fix tests for pt-archiver

Fixed tests t/pt-archiver/bulk_insert.t, t/pt-archiver/issue_1225.t, t/pt-archiver/issue_1229.t
Their failures were due to change of utf8 alias from utf8mb3 in MySQL 5.7 to utf8mb4 in MySQL 8.0.
And also due to character set match check between connection ad source table.

* PT-2141 Fix tests for pt-archiver

Removed test for PT-1898, because it was broken from the beginning:
- it called pt-online-schema-change instead of pt-archiver
- it announced it will run 6 tests while was running only 2
- the test case itself did not test the issue, described in PT-1898
This commit is contained in:
Sveta Smirnova
2023-02-02 17:09:34 +03:00
committed by GitHub
parent f9726e75cc
commit 01de987154
5 changed files with 18 additions and 151 deletions

View File

@@ -103,9 +103,13 @@ for my $char ( "\N{KATAKANA LETTER NI}", "\N{U+DF}" ) {
my $sql = qq{INSERT INTO `bug_1127450`.`original` VALUES (1, ?)};
$utf8_dbh->prepare($sql)->execute($char);
# We need to have --no-check-charset here, because utf8 that we use in the test file
# is alias of utf8mb3 in 5.7 and alias of utf8mb4 in 8.0.
# We cannot set this character set explicitly due to Perl limitations.
# Changing utf8 to utf8mb4 will break test on 5.7
$output = output(
sub { pt_archiver::main(qw(--no-ascend --limit 50 --bulk-insert),
qw(--bulk-delete --where 1=1 --statistics --charset utf8),
qw(--bulk-delete --where 1=1 --statistics --charset utf8 --no-check-charset),
'--source', "L=1,D=bug_1127450,t=original,F=$cnf",
'--dest', "t=copy") }, stderr => 1
);