pt-duplicate-key-checker intermitently fails to report full unique col index duplicating partial unique col index
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Triaged
|
Medium
|
Frank Cizmich |
Bug Description
(originally reported by David Bennet)
to reproduce:
CREATE TABLE ai6 (
id int(11) NOT NULL,
c1 int(11) DEFAULT NULL,
c2 int(11) DEFAULT NULL,
c3 varchar(64) DEFAULT NULL,
c4 varchar(64) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- OLD index entire column
CREATE UNIQUE INDEX c3_full ON ai6 (c3);
-- NEW enforce first 5 characters being unique
CREATE UNIQUE INDEX c3_partial ON ai6 (c3(5));
Consecutive runs spuriously fail to report duplicate:
$ bin/pt-
# #######
# test.ai6
# #######
# Uniqueness of c3_full ignored because c3_part is a duplicate constraint
# c3_full is a left-prefix of c3_part
# Key definitions:
# UNIQUE KEY `c3_full` (`c3`),
# UNIQUE KEY `c3_part` (`c3`(5))
# Column types:
# `c3` varchar(64) default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`ai6` DROP INDEX `c3_full`;
# #######
# Summary of indexes
# #######
# Size Duplicate Indexes 67
# Total Duplicate Indexes 1
# Total Indexes 3
$ bin/pt-
# #######
# Summary of indexes
# #######
# Total Indexes 3
$ bin/pt-
# #######
# Summary of indexes
# #######
# Total Indexes 3
$ bin/pt-
# #######
# test.ai6
# #######
# Uniqueness of c3_full ignored because c3_part is a duplicate constraint
# c3_full is a left-prefix of c3_part
# Key definitions:
# UNIQUE KEY `c3_full` (`c3`),
# UNIQUE KEY `c3_part` (`c3`(5))
# Column types:
# `c3` varchar(64) default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`ai6` DROP INDEX `c3_full`;
# #######
# Summary of indexes
# #######
# Size Duplicate Indexes 67
# Total Duplicate Indexes 1
# Total Indexes 3
Changed in percona-toolkit: | |
importance: | Undecided → High |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
status: | New → Triaged |
Changed in percona-toolkit: | |
importance: | High → Medium |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-677