mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 22:50:25 +00:00
pt-duplicate-key-checker skipped reporting when verbose option on
This commit is contained in:
@@ -4972,7 +4972,6 @@ sub main {
|
||||
print_all_keys($keys, $tbl, \%seen_tbl) if $keys;
|
||||
print_all_keys($fks, $tbl, \%seen_tbl) if $fks;
|
||||
}
|
||||
else {
|
||||
PTDEBUG && _d('Getting duplicate keys on',
|
||||
$tbl->{db}, $tbl->{tbl});
|
||||
if ( $keys ) {
|
||||
@@ -5012,7 +5011,6 @@ sub main {
|
||||
summary => \%summary,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
# Always count Total Keys so print_key_summary won't die
|
||||
# because %summary is empty.
|
||||
|
@@ -136,14 +136,16 @@ ok(
|
||||
# #############################################################################
|
||||
# Exact unique dupes
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1217013
|
||||
# Also added --verbose option (-v) to test for:
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1402730
|
||||
# #############################################################################
|
||||
|
||||
$sb->load_file('master', 't/lib/samples/dupekeys/simple_dupe_bug_1217013.sql', 'test');
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_duplicate_key_checker::main(@args, qw(-t test.domains)) },
|
||||
"$sample/simple_dupe_bug_1217013.txt"),
|
||||
sub { pt_duplicate_key_checker::main(@args, qw(-t test.domains -v)) },
|
||||
"$sample/simple_dupe_bug_1217013.txt", keep_output=>1),
|
||||
'Exact unique dupes (bug 1217013)'
|
||||
) or diag($test_diff);
|
||||
|
||||
|
@@ -2,6 +2,10 @@
|
||||
# test.domains
|
||||
# ########################################################################
|
||||
|
||||
# unique_key_domain (`domain`)
|
||||
# domain (`domain`)
|
||||
# PRIMARY (`id`)
|
||||
|
||||
# Uniqueness of domain ignored because unique_key_domain is a duplicate constraint
|
||||
# domain is a duplicate of unique_key_domain
|
||||
# Key definitions:
|
||||
|
Reference in New Issue
Block a user