Add forked Maatkit tools in bin/ and their tests in t/.

This commit is contained in:
Daniel Nichter
2011-06-24 16:02:05 -06:00
parent 6c501128e6
commit b4b6376be1
679 changed files with 177876 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
# ########################################################################
# test.dupe_key
# ########################################################################
# a is a left-prefix of a_2
# Key definitions:
# KEY `a` (`a`),
# KEY `a_2` (`a`,`b`)
# Column types:
# `a` int(11) default null
# `b` int(11) default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`dupe_key` DROP INDEX `a`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,13 @@
# ########################################################################
# issue_1192.issue_1192
# ########################################################################
# a is a duplicate of PRIMARY
# Key definitions:
# KEY `a` (`a`),
# PRIMARY KEY (`a`),
# Column types:
# `a` int(11) not null default '0'
# To remove this duplicate index, execute:
ALTER TABLE `issue_1192`.`issue_1192` DROP INDEX `a`;

View File

@@ -0,0 +1,5 @@
# ########################################################################
# Summary of indexes
# ########################################################################
# Total Indexes 2

View File

@@ -0,0 +1,21 @@
# ########################################################################
# issue_295.t
# ########################################################################
# Key b_a ends with a prefix of the clustered index
# Key definitions:
# KEY `b_a` (`b`,`a`)
# PRIMARY KEY (`a`),
# Column types:
# `b` int(11) not null
# `a` int(11) not null
# To shorten this duplicate clustered index, execute:
ALTER TABLE `issue_295`.`t` DROP INDEX `b_a`, ADD INDEX `b_a` (`b`);
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 8
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,11 @@
DROP DATABASE IF EXISTS issue_295;
CREATE DATABASE issue_295;
USE issue_295;
DROP TABLE IF EXISTS `t`;
CREATE TABLE `t` (
a INT NOT NULL,
b INT NOT NULL,
PRIMARY KEY (a),
INDEX b_a (b, a)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@@ -0,0 +1,21 @@
# ########################################################################
# issue_295.t
# ########################################################################
# Key b_a ends with a prefix of the clustered index
# Key definitions:
# KEY `b_a` (`b`,`a`)
# PRIMARY KEY (`a`),
# Column types:
# `b` int(11) not null
# `a` int(11) not null
# To shorten this duplicate clustered index, execute:
ALTER TABLE `issue_295`.`t` DROP INDEX `b_a`, ADD INDEX `b_a` (`b`);
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 8
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,19 @@
DROP DATABASE IF EXISTS issue_331;
CREATE DATABASE issue_331;
USE issue_331;
DROP TABLE IF EXISTS `issue_331_t1`;
CREATE TABLE `issue_331_t1` (
`t1_id` bigint(20) NOT NULL default '0',
`bar` bigint(20) NOT NULL default '0',
PRIMARY KEY (`t1_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `issue_331_t2`;
CREATE TABLE `issue_331_t2` (
`id` bigint(20) NOT NULL default '0',
`foo` bigint(20) NOT NULL default '0',
PRIMARY KEY (`id`),
CONSTRAINT `fk_1` FOREIGN KEY (`id`) REFERENCES `issue_331_t1` (`t1_id`),
CONSTRAINT `fk_2` FOREIGN KEY (`id`) REFERENCES `issue_331_t1` (`t1_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@@ -0,0 +1,21 @@
# ########################################################################
# issue_331.issue_331_t2
# ########################################################################
# FOREIGN KEY fk_1 (`id`) REFERENCES `issue_331`.`issue_331_t1` (`t1_id`) is a duplicate of FOREIGN KEY fk_2 (`id`) REFERENCES `issue_331`.`issue_331_t1` (`t1_id`)
# Key definitions:
# CONSTRAINT `fk_1` FOREIGN KEY (`id`) REFERENCES `issue_331_t1` (`t1_id`)
# CONSTRAINT `fk_2` FOREIGN KEY (`id`) REFERENCES `issue_331_t1` (`t1_id`)
# Column types:
# `id` bigint(20) not null default '0'
# To remove this duplicate foreign key, execute:
ALTER TABLE `issue_331`.`issue_331_t2` DROP FOREIGN KEY `fk_1`;
# MySQL uses the PRIMARY index for this foreign key constraint
# ########################################################################
# Summary of indexes
# ########################################################################
# Total Duplicate Indexes 1
# Total Indexes 4

View File

@@ -0,0 +1,12 @@
DROP DATABASE IF EXISTS issue_663;
CREATE DATABASE issue_663;
USE issue_663;
CREATE TABLE `t` (
`id` int(10) unsigned NOT NULL auto_increment,
`trx_id` int(10) unsigned default NULL,
`dTime` datetime NOT NULL,
`xmlerror` text,
PRIMARY KEY (`id`),
KEY `idx1` (`trx_id`),
KEY `idx2` (`trx_id`, `xmlerror`(128), `dTime`)
) ENGINE=MyISAM;

View File

@@ -0,0 +1,5 @@
# ########################################################################
# Summary of indexes
# ########################################################################
# Total Indexes 0

View File

@@ -0,0 +1,19 @@
# ########################################################################
# test.dupe_key
# ########################################################################
# a is a left-prefix of a_2
# Key definitions:
# KEY `a` (`a`),
# KEY `a_2` (`a`,`b`)
# Column types:
# `a` int(11) default null
# `b` int(11) default null
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,14 @@
# ########################################################################
# test.dupe_key
# ########################################################################
# a is a left-prefix of a_2
# Key definitions:
# KEY `a` (`a`),
# KEY `a_2` (`a`,`b`)
# Column types:
# `a` int(11) default null
# `b` int(11) default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`dupe_key` DROP INDEX `a`;

View File

@@ -0,0 +1,20 @@
# ########################################################################
# test.UPPER_TEST
# ########################################################################
# A is a duplicate of PRIMARY
# Key definitions:
# KEY `A` (`A`)
# PRIMARY KEY (`A`),
# Column types:
# `a` int(11) not null default '0'
# To remove this duplicate index, execute:
ALTER TABLE `test`.`UPPER_TEST` DROP INDEX `A`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,20 @@
# ########################################################################
# test.UPPER_TEST
# ########################################################################
# A is a duplicate of PRIMARY
# Key definitions:
# KEY `A` (`A`)
# PRIMARY KEY (`A`),
# Column types:
# `a` int(11) not null default '0'
# To remove this duplicate index, execute:
ALTER TABLE `test`.`UPPER_TEST` DROP INDEX `A`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 2