mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 02:05:23 +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');
|
||||
|
||||
$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(
|
||||
$original_rows,
|
||||
[ [ 1, 'が'], # Your terminal must be UTF8 to see this Japanese character.
|
||||
[ 2, 'が'],
|
||||
[ ['が'], # Your terminal must be UTF8 to see this Japanese character.
|
||||
['が'],
|
||||
],
|
||||
"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(
|
||||
$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"
|
||||
);
|
||||
|
||||
@@ -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(
|
||||
$original_rows,
|
||||
|
Reference in New Issue
Block a user