mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
Implement IndexLength in pt-table-checksum and pt-online-schema-change. Tag the IndexLength queries with "key_len" and make n_index_cols optional--get full key_len if not given.
This commit is contained in:
@@ -175,7 +175,7 @@ is(
|
||||
$exit_status,
|
||||
0,
|
||||
"Bad key_len chunks are not errors"
|
||||
);
|
||||
) or diag($output);
|
||||
|
||||
cmp_ok(
|
||||
PerconaTest::count_checksum_results($output, 'skipped'),
|
||||
@@ -223,14 +223,18 @@ $output = output(
|
||||
$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),
|
||||
qw(--chunk-index-columns 1 --chunk-size-limit 3),
|
||||
);
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
is(
|
||||
# Since we're not using the full index, it's basically a non-unique index,
|
||||
# so there are dupes. The table really has 5462 rows, so we must get
|
||||
# at least that many, and probably a few more.
|
||||
cmp_ok(
|
||||
PerconaTest::count_checksum_results($output, 'rows'),
|
||||
'>=',
|
||||
5462,
|
||||
"Initial key_len reflects --chunk-index-columns"
|
||||
) or diag($output);
|
||||
|
||||
Reference in New Issue
Block a user