mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 10:34:01 +00:00
t/pt-archiver/issue_1225.t: Don't assume that the first two values in an autoinc table will have indexes 1 & 2
This commit is contained in:
@@ -34,11 +34,11 @@ my $output;
|
|||||||
$sb->load_file('master', 't/pt-archiver/samples/issue_1225.sql');
|
$sb->load_file('master', 't/pt-archiver/samples/issue_1225.sql');
|
||||||
|
|
||||||
$dbh->do('set names "utf8"');
|
$dbh->do('set names "utf8"');
|
||||||
my $original_rows = $dbh->selectall_arrayref('select * from issue_1225.t where i in (1, 2)');
|
my $original_rows = $dbh->selectall_arrayref('select c from issue_1225.t limit 2');
|
||||||
is_deeply(
|
is_deeply(
|
||||||
$original_rows,
|
$original_rows,
|
||||||
[ [ 1, 'が'], # Your terminal must be UTF8 to see this Japanese character.
|
[ ['が'], # Your terminal must be UTF8 to see this Japanese character.
|
||||||
[ 2, 'が'],
|
['が'],
|
||||||
],
|
],
|
||||||
"Inserted UTF8 data"
|
"Inserted UTF8 data"
|
||||||
);
|
);
|
||||||
@@ -61,10 +61,10 @@ $output = output(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
my $archived_rows = $dbh->selectall_arrayref('select * from issue_1225.a where i in (1, 2)');
|
my $archived_rows = $dbh->selectall_arrayref('select c from issue_1225.a limit 2');
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
$original_rows->[0]->[1] ne $archived_rows->[0]->[1],
|
$original_rows->[0]->[0] ne $archived_rows->[0]->[0],
|
||||||
"UTF8 characters lost when cxn isn't also UTF8"
|
"UTF8 characters lost when cxn isn't also UTF8"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ $output = output(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
$archived_rows = $dbh->selectall_arrayref('select * from issue_1225.a where i in (1, 2)');
|
$archived_rows = $dbh->selectall_arrayref('select c from issue_1225.a limit 2');
|
||||||
|
|
||||||
is_deeply(
|
is_deeply(
|
||||||
$original_rows,
|
$original_rows,
|
||||||
|
Reference in New Issue
Block a user