Merge lp:~percona-toolkit-dev/percona-toolkit/pt-duplicate-key-checker-skips-report-when-verbose-on-1402730 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.14
Proposed by
Frank Cizmich
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Daniel Nichter | ||||
Approved revision: | 616 | ||||
Merged at revision: | 614 | ||||
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/pt-duplicate-key-checker-skips-report-when-verbose-on-1402730 | ||||
Merge into: | lp:~percona-toolkit-dev/percona-toolkit/release-2.2.14 | ||||
Diff against target: |
285 lines (+89/-62) 5 files modified
bin/pt-duplicate-key-checker (+61/-51) t/pt-duplicate-key-checker/basics.t (+15/-2) t/pt-duplicate-key-checker/issue_331.t (+2/-2) t/pt-duplicate-key-checker/samples/issue_331.txt (+3/-3) t/pt-duplicate-key-checker/samples/simple_dupe_bug_1217013.txt (+8/-4) |
||||
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-duplicate-key-checker-skips-report-when-verbose-on-1402730 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Approve | ||
David Bennett (community) | Needs Fixing | ||
Review via email: mp+253857@code.launchpad.net |
Description of the change
pt-duplicate-
It simply seems an small error in the code made it skip the reporting functions when verbose was set.
Note: also tweaked test case to catch this.
Note2: also added warning about FULLTEXT indexes not being computed in total size, when they exist and are duplicated.
To post a comment you must log in.
Size of duplicate full text indexes is computed and reported as 0
Due to the variant nature of ft indexes, it would be best to avoid trying to compute the estimated size. I recommend changing the report line to:
Size Duplicate Indexes ### (not including FULLTEXT indexes)
----
CREATE TABLE `ai5` (
`id` int(11) NOT NULL,
`c1` int(11) DEFAULT NULL,
`c2` int(11) DEFAULT NULL,
`c3` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `c3` (`c3`),
FULLTEXT KEY `c3_2` (`c3`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
$ ./pt-duplicate- key-checker --verbose --tables=test.ai5 ####### ####### ####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ####### ####### ####### ##
# #######
# test.ai5
# #######
# c3_2 (`c3`)
# PRIMARY (`id`)
# c3 (`c3`)
# c3_2 is a duplicate of c3
# Key definitions:
# FULLTEXT KEY `c3_2` (`c3`)
# FULLTEXT KEY `c3` (`c3`),
# Column types:
# `c3` varchar(64) default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`ai5` DROP INDEX `c3_2`;
# ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ####### ####### ####### ##
# Summary of indexes
# #######
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 3