pt-duplicate-key-checker not finding some duplicated keys

Bug #1095666 reported by Patrick Allaert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Invalid
Undecided
Unassigned
2.1
Won't Fix
Undecided
Unassigned
2.2
Invalid
Undecided
Unassigned

Bug Description

With the following table:

CREATE TABLE `ezcontentobject_attribute` (
  `attribute_original_id` int(11) DEFAULT '0',
  `contentclassattribute_id` int(11) NOT NULL DEFAULT '0',
  `contentobject_id` int(11) NOT NULL DEFAULT '0',
  `data_float` double DEFAULT NULL,
  `data_int` int(11) DEFAULT NULL,
  `data_text` longtext,
  `data_type_string` varchar(50) DEFAULT '',
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `language_code` varchar(20) NOT NULL DEFAULT '',
  `language_id` int(11) NOT NULL DEFAULT '0',
  `sort_key_int` int(11) NOT NULL DEFAULT '0',
  `sort_key_string` varchar(255) NOT NULL DEFAULT '',
  `version` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`version`),
  KEY `ezcontentobject_attr_id` (`id`),
  KEY `ezcontentobject_attribute_co_id_ver_lang_code` (`contentobject_id`,`version`,`language_code`),
  KEY `ezcontentobject_attribute_language_code` (`language_code`),
  KEY `sort_key_int` (`sort_key_int`),
  KEY `sort_key_string` (`sort_key_string`)
) ENGINE=InnoDB;

I expect to see a suggestion about dropping: "ezcontentobject_attr_id" index.

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

Yes, it looks like it should suggest that. Which version of the tool?

Changed in percona-toolkit:
status: New → Triaged
Revision history for this message
Patrick Allaert (patrick-allaert) wrote :

Version 2.1.1 as provided by Gentoo, but note that this bug existed with maatkit as well.

Revision history for this message
Kamil Dziedzic (arvenil) wrote :

Works fine for me on 2.2.3

# ########################################################################
# test.ezcontentobject_attribute
# ########################################################################

# ezcontentobject_attr_id is a left-prefix of PRIMARY
# Key definitions:
# KEY `ezcontentobject_attr_id` (`id`),
# PRIMARY KEY (`id`,`version`),
# Column types:
# `id` int(11) not null auto_increment
# `version` int(11) not null default '0'
# To remove this duplicate index, execute:
ALTER TABLE `test`.`ezcontentobject_attribute` DROP INDEX `ezcontentobject_attr_id`;

Changed in percona-toolkit:
importance: Undecided → Medium
assignee: nobody → Daniel Nichter (daniel-nichter)
milestone: none → 2.2.6
Changed in percona-toolkit:
status: Triaged → In Progress
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

This is fixed in 2.2 but exists in 2.1. Since 2.1 is no longer generally supported (or developed), it won't be fixed in 2.1 unless requested by a Percona support customer. Upgrading to 2.2 will fix this and other bugs. In general, 2.2 is superior to 2.1; everyone is strongly encouraged to upgrade.

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-1061

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.