mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 02:05:23 +00:00
Don't get min/max a 2nd time in _chunk_char(). Use where in _chunk_char(). Test char chunking world_city.name with real range stats. Add failing pt-table-checksum char chunk --where test.
This commit is contained in:
@@ -24,7 +24,7 @@ if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 13;
|
||||
plan tests => 14;
|
||||
}
|
||||
|
||||
my ($output, $output2);
|
||||
@@ -134,7 +134,25 @@ ok(
|
||||
"t/pt-table-checksum/samples/where01.out",
|
||||
trf => "awk '{print \$1 \" \" \$2 \" \" \$3}'",
|
||||
),
|
||||
"--where affects range stats (bug 821673)"
|
||||
"--where affects int range stats (bug 821673)"
|
||||
);
|
||||
|
||||
# Test it again with a varchar primary key. The resulting 5 rows are:
|
||||
# | Apple | 2011-03-03 |
|
||||
# | lemon | 2011-03-03 |
|
||||
# | lime | 2011-03-03 |
|
||||
# | pineapple | 2011-03-03 |
|
||||
# | raspberry | 2011-03-03 |
|
||||
$sb->load_file('master', "t/pt-table-checksum/samples/where02.sql");
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_table_checksum::main(@args,
|
||||
qw(--no-zero-chunk --chunk-size 5), '--where', "date = '2011-03-03'");
|
||||
},
|
||||
"t/pt-table-checksum/samples/where02.out",
|
||||
trf => "awk '{print \$1 \" \" \$2 \" \" \$3}'",
|
||||
),
|
||||
"--where affects char range stats (bug 821673)"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
|
Reference in New Issue
Block a user