PT-1154 Fixed /pt-duplicate-key-checker/basics.t for MySQL 8

This commit is contained in:
Carlos Salguero
2018-06-01 09:32:26 -03:00
parent 42b20e1ee0
commit 9d02b690e0
3 changed files with 28 additions and 2 deletions

View File

@@ -140,10 +140,11 @@ ok(
$sb->load_file('master', 't/lib/samples/dupekeys/simple_dupe_bug_1217013.sql', 'test');
my $want = $sandbox_version lt '8.0' ? "$sample/simple_dupe_bug_1217013.txt" : "$sample/simple_dupe_bug_1217013_80.txt";
ok(
no_diff(
sub { pt_duplicate_key_checker::main(@args, qw(-t test.domains -v)) },
"$sample/simple_dupe_bug_1217013.txt"),
$want),
'Exact unique dupes (bug 1217013)'
) or diag($test_diff);

View File

@@ -12,7 +12,7 @@
# UNIQUE KEY `domain` (`domain`),
# UNIQUE KEY `unique_key_domain` (`domain`)
# Column types:
# `domain` varchar(175) collate utf8_bin not null
# `domain` varchar(175) character set utf8 collate utf8_bin not null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`domains` DROP INDEX `domain`;

View File

@@ -0,0 +1,25 @@
# ########################################################################
# test.domains
# ########################################################################
# PRIMARY (`id`)
# domain (`domain`)
# unique_key_domain (`domain`)
# 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) character set utf8 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