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

Reported by monty on 2013-08-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
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

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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers