mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 14:18:32 +00:00
Add failing unit test.
This commit is contained in:
@@ -39,7 +39,7 @@ if ( !$dbh ) {
|
|||||||
plan skip_all => 'Cannot connect to sandbox master';
|
plan skip_all => 'Cannot connect to sandbox master';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plan tests => 48;
|
plan tests => 49;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $q = new Quoter();
|
my $q = new Quoter();
|
||||||
@@ -86,7 +86,7 @@ sub make_nibble_iter {
|
|||||||
|
|
||||||
my $ni = new NibbleIterator(
|
my $ni = new NibbleIterator(
|
||||||
Cxn => $cxn,
|
Cxn => $cxn,
|
||||||
tbl => $schema->get_table($args{db}, $args{tbl}),
|
tbl => $schema->get_table(lc($args{db}), lc($args{tbl})),
|
||||||
chunk_size => $o->get('chunk-size'),
|
chunk_size => $o->get('chunk-size'),
|
||||||
chunk_index => $o->get('chunk-index'),
|
chunk_index => $o->get('chunk-index'),
|
||||||
callbacks => $args{callbacks},
|
callbacks => $args{callbacks},
|
||||||
@@ -833,6 +833,26 @@ is(
|
|||||||
"Custom bite comment"
|
"Custom bite comment"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/995274
|
||||||
|
# Index case-sensitivity.
|
||||||
|
# #############################################################################
|
||||||
|
$sb->load_file('master', "t/pt-table-checksum/samples/undef-arrayref-bug-995274.sql");
|
||||||
|
PerconaTest::wait_for_table($dbh, "test.GroupMembers", "id=493076");
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$ni = make_nibble_iter(
|
||||||
|
db => 'test',
|
||||||
|
tbl => 'GroupMembers',
|
||||||
|
argv => [qw(--databases test --chunk-size 100)],
|
||||||
|
);
|
||||||
|
};
|
||||||
|
is(
|
||||||
|
$EVAL_ERROR,
|
||||||
|
undef,
|
||||||
|
"Bug 995274: case-sensitive chunk index"
|
||||||
|
);
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
@@ -57,8 +57,10 @@ my $sample = "t/pt-table-checksum/samples/";
|
|||||||
$sb->load_file('master', "$sample/undef-arrayref-bug-995274.sql");
|
$sb->load_file('master', "$sample/undef-arrayref-bug-995274.sql");
|
||||||
PerconaTest::wait_for_table($slave_dbh, "test.GroupMembers", "id=493076");
|
PerconaTest::wait_for_table($slave_dbh, "test.GroupMembers", "id=493076");
|
||||||
|
|
||||||
|
# Must chunk the table so an index is used.
|
||||||
$output = output(
|
$output = output(
|
||||||
sub { $exit_status = pt_table_checksum::main(@args, qw(-d test)) },
|
sub { $exit_status = pt_table_checksum::main(@args,
|
||||||
|
qw(-d test --chunk-size 100)) },
|
||||||
stderr => 1,
|
stderr => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user