mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 00:43:58 +00:00
Test and fix bug 1217013.
This commit is contained in:
@@ -22,9 +22,6 @@ my $dbh = $sb->get_dbh_for('master');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 13;
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $sample = "t/pt-duplicate-key-checker/samples/";
|
||||
@@ -136,9 +133,23 @@ ok(
|
||||
'--key-types fk (explicit)'
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Exact unique dupes
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1217013
|
||||
# #############################################################################
|
||||
|
||||
$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"),
|
||||
'Exact unique dupes (bug 1217013)'
|
||||
) or diag($test_diff);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
$sb->wipe_clean($dbh);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
exit;
|
||||
done_testing;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# test.bug_894140
|
||||
# ########################################################################
|
||||
|
||||
# Uniqueness of row_id ignored because PRIMARY is a duplicate constraint
|
||||
# row_id is a duplicate of PRIMARY
|
||||
# Key definitions:
|
||||
# UNIQUE KEY `row_id` (`row_id`),
|
||||
|
@@ -0,0 +1,21 @@
|
||||
# ########################################################################
|
||||
# test.domains
|
||||
# ########################################################################
|
||||
|
||||
# Uniqueness of domain ignored because unique_key_domain is a duplicate constraint
|
||||
# domain is a duplicate of unique_key_domain
|
||||
# Key definitions:
|
||||
# UNIQUE KEY `domain` (`domain`),
|
||||
# UNIQUE KEY `unique_key_domain` (`domain`)
|
||||
# Column types:
|
||||
# `domain` varchar(175) collate utf8_bin not null
|
||||
# To remove this duplicate index, execute:
|
||||
ALTER TABLE `test`.`domains` DROP INDEX `domain`;
|
||||
|
||||
# ########################################################################
|
||||
# Summary of indexes
|
||||
# ########################################################################
|
||||
|
||||
# Size Duplicate Indexes 527
|
||||
# Total Duplicate Indexes 1
|
||||
# Total Indexes 3
|
Reference in New Issue
Block a user