pt-duplicate-key-checker misses exact duplicate unique indexes

Bug #1217013 reported by monty solomon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Daniel Nichter

Bug Description

USE test

CREATE TABLE `domains` (
  `id` bigint(20) NOT NULL,
  `domain` varchar(175) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `domain` (`domain`),
  UNIQUE KEY `unique_key_domain` (`domain`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

QUIT

$ pt-duplicate-key-checker --verbose --database test
# ########################################################################
# test.domains
# ########################################################################

# unique_key_domain (`domain`)
# domain (`domain`)
# PRIMARY (`id`)

# ########################################################################
# Summary of indexes
# ########################################################################

# Total Indexes 3

$ pt-duplicate-key-checker --version
pt-duplicate-key-checker 2.2.4

Related branches

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Fascinating. There are tests for exact dupes--the simplest case. And I don't recall the index name being a factor. So I'm not sure what's wrong here but we'll find out.

tags: added: pt-duplicate-key-checker
Changed in percona-toolkit:
status: New → Confirmed
Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
importance: Undecided → Medium
milestone: none → 2.2.6
Changed in percona-toolkit:
status: Confirmed → In Progress
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Indeed, exact unique dupes were not detected. Based on old code comments, it seems like one part of the code was relying on another, but the 2nd part didn't exist or was removed. It's tested and fixed now.

Changed in percona-toolkit:
status: In Progress → Fix Committed
summary: - pt-duplicate-key-checker misses duplicate keys
+ pt-duplicate-key-checker misses exact unique index duplicates
summary: - pt-duplicate-key-checker misses exact unique index duplicates
+ pt-duplicate-key-checker misses exact duplicate unique indexes
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

Sorry, but I see exactly the same problem with version 2.2.12 of the tool while working with PS 5.6.21-70.1. The tool does NOT consider indexes as duplicates as soon as their names are different. it seems nothing else matters.

tags: added: i49100
Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Not sure if both issues are related, but it is now solved.
Patch available in:
https://bugs.launchpad.net/percona-toolkit/+bug/1402730

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-624

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.