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:
Brian Fraser
2012-11-21 13:23:05 -03:00
parent ef458d6bc2
commit 98190d25e7

View File

@@ -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,