mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-14 23:40:58 +00:00
Add forked Maatkit tools in bin/ and their tests in t/.
This commit is contained in:
21
t/pt-duplicate-key-checker/samples/basic_output.txt
Normal file
21
t/pt-duplicate-key-checker/samples/basic_output.txt
Normal 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
|
13
t/pt-duplicate-key-checker/samples/issue_1192.txt
Normal file
13
t/pt-duplicate-key-checker/samples/issue_1192.txt
Normal 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`;
|
||||
|
5
t/pt-duplicate-key-checker/samples/issue_269.txt
Normal file
5
t/pt-duplicate-key-checker/samples/issue_269.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
# ########################################################################
|
||||
# Summary of indexes
|
||||
# ########################################################################
|
||||
|
||||
# Total Indexes 2
|
21
t/pt-duplicate-key-checker/samples/issue_295-51.txt
Normal file
21
t/pt-duplicate-key-checker/samples/issue_295-51.txt
Normal 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
|
11
t/pt-duplicate-key-checker/samples/issue_295.sql
Normal file
11
t/pt-duplicate-key-checker/samples/issue_295.sql
Normal 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;
|
21
t/pt-duplicate-key-checker/samples/issue_295.txt
Normal file
21
t/pt-duplicate-key-checker/samples/issue_295.txt
Normal 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
|
19
t/pt-duplicate-key-checker/samples/issue_331.sql
Normal file
19
t/pt-duplicate-key-checker/samples/issue_331.sql
Normal 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;
|
21
t/pt-duplicate-key-checker/samples/issue_331.txt
Normal file
21
t/pt-duplicate-key-checker/samples/issue_331.txt
Normal 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
|
12
t/pt-duplicate-key-checker/samples/issue_663.sql
Normal file
12
t/pt-duplicate-key-checker/samples/issue_663.sql
Normal 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;
|
5
t/pt-duplicate-key-checker/samples/nonexistent_db.txt
Normal file
5
t/pt-duplicate-key-checker/samples/nonexistent_db.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
# ########################################################################
|
||||
# Summary of indexes
|
||||
# ########################################################################
|
||||
|
||||
# Total Indexes 0
|
19
t/pt-duplicate-key-checker/samples/nosql_output.txt
Normal file
19
t/pt-duplicate-key-checker/samples/nosql_output.txt
Normal 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
|
14
t/pt-duplicate-key-checker/samples/nosummary_output.txt
Normal file
14
t/pt-duplicate-key-checker/samples/nosummary_output.txt
Normal 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`;
|
||||
|
20
t/pt-duplicate-key-checker/samples/uppercase_names-51.txt
Normal file
20
t/pt-duplicate-key-checker/samples/uppercase_names-51.txt
Normal 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
|
20
t/pt-duplicate-key-checker/samples/uppercase_names.txt
Normal file
20
t/pt-duplicate-key-checker/samples/uppercase_names.txt
Normal 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
|
Reference in New Issue
Block a user