Failing test for key_len with --chunk-index-columns.

This commit is contained in:
Daniel Nichter
2012-06-11 11:58:16 -04:00
parent fa9cf03505
commit 4f3bdabf7c

View File

@@ -25,7 +25,7 @@ if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox master'; plan skip_all => 'Cannot connect to sandbox master';
} }
else { else {
plan tests => 16; plan tests => 17;
} }
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
@@ -205,18 +205,35 @@ $output = output(
sub { sub {
$exit_status = pt_table_checksum::main( $exit_status = pt_table_checksum::main(
$master_dsn, '--max-load', '', $master_dsn, '--max-load', '',
qw(--lock-wait-timeout 3 --chunk-size 5000 -t sakila.rental), qw(--lock-wait-timeout 3 --chunk-size 1000 -t sakila.film_actor),
qw(--chunk-index rental_date --chunk-index-columns 5), qw(--chunk-index PRIMARY --chunk-index-columns 9),
qw(--explain --explain)); );
}, },
stderr => 1, stderr => 1,
); );
is( is(
$exit_status, PerconaTest::count_checksum_results($output, 'rows'),
0, 5462,
"--chunk-index-columns > number of index columns" "--chunk-index-columns > number of index columns"
) or diag($output);
$output = output(
sub {
$exit_status = pt_table_checksum::main(
$master_dsn, '--max-load', '',
qw(--lock-wait-timeout 3 --chunk-size 1000 -t sakila.film_actor),
qw(--chunk-index-columns 1),
); );
},
stderr => 1,
);
is(
PerconaTest::count_checksum_results($output, 'rows'),
5462,
"Initial key_len reflects --chunk-index-columns"
) or diag($output);
# ############################################################################# # #############################################################################
# Done. # Done.