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

Reported by Patrick Allaert on 2013-01-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Status tracked in 2.2
2.1
Undecided
Unassigned
2.2
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.

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

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

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

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

Other bug subscribers