mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-03 19:15:54 +00:00
add test case
This commit is contained in:
@@ -80,6 +80,15 @@ ok(
|
||||
'--nosql'
|
||||
);
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_duplicate_key_checker::main(@args, qw(-d test --invisible)) },
|
||||
"$sample/basic_invisible.txt",
|
||||
transform_sample => $transform_int
|
||||
),
|
||||
'--invisible'
|
||||
);
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_duplicate_key_checker::main(@args, qw(-d test --nosummary)) },
|
||||
|
21
t/pt-duplicate-key-checker/samples/basic_invisible.txt
Normal file
21
t/pt-duplicate-key-checker/samples/basic_invisible.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
# ########################################################################
|
||||
# test.dupe_key
|
||||
# ########################################################################
|
||||
|
||||
# a is a left-prefix of a_2
|
||||
# Key definitions:
|
||||
# KEY `a` (`a`),
|
||||
# KEY `a_2` (`a`,`b`)
|
||||
# Column types:
|
||||
# `a` int(11) default null
|
||||
# `b` int(11) default null
|
||||
# To remove this duplicate index, execute:
|
||||
ALTER TABLE `test`.`dupe_key` ALTER INDEX `a` INVISIBLE;
|
||||
|
||||
# ########################################################################
|
||||
# Summary of indexes
|
||||
# ########################################################################
|
||||
|
||||
# Size Duplicate Indexes 0
|
||||
# Total Duplicate Indexes 1
|
||||
# Total Indexes 2
|
Reference in New Issue
Block a user