mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Add test placeholder for bug 1214114.
This commit is contained in:
@@ -10,6 +10,7 @@ use strict;
|
|||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
use English qw(-no_match_vars);
|
use English qw(-no_match_vars);
|
||||||
use Test::More;
|
use Test::More;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
use VersionParser;
|
use VersionParser;
|
||||||
use DuplicateKeyFinder;
|
use DuplicateKeyFinder;
|
||||||
@@ -772,6 +773,36 @@ is_deeply(
|
|||||||
'Finds duplicates OK on uppercase columns',
|
'Finds duplicates OK on uppercase columns',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1214114
|
||||||
|
# #############################################################################
|
||||||
|
#$ddl = load_file('t/lib/samples/dupekeys/prefix_bug_1214114.sql');
|
||||||
|
#$dupes = [];
|
||||||
|
#($keys, $ck) = $tp->get_keys($ddl, $opt);
|
||||||
|
#$dk->get_duplicate_keys(
|
||||||
|
# $keys,
|
||||||
|
# clustered_key => $ck,
|
||||||
|
# clustered => 1,
|
||||||
|
# callback => $callback,
|
||||||
|
# tbl_info => { engine => 'InnoDB', ddl => $ddl },
|
||||||
|
#);
|
||||||
|
#
|
||||||
|
#is_deeply(
|
||||||
|
# $dupes,
|
||||||
|
# [{
|
||||||
|
# cols => ['b', 'id'],
|
||||||
|
# ddl => 'KEY `b` (`b`,`id`)',
|
||||||
|
# dupe_type => 'clustered',
|
||||||
|
# duplicate_of => 'PRIMARY',
|
||||||
|
# duplicate_of_cols => ['id'],
|
||||||
|
# duplicate_of_ddl => 'PRIMARY KEY (`id`),',
|
||||||
|
# key => 'b',
|
||||||
|
# reason => 'Key b ends with a prefix of the clustered index',
|
||||||
|
# short_key => '`b`',
|
||||||
|
# }],
|
||||||
|
# "Prefix bug 1214114"
|
||||||
|
#) or diag(Dumper($dupes));
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
@@ -787,4 +818,3 @@ like(
|
|||||||
'_d() works'
|
'_d() works'
|
||||||
);
|
);
|
||||||
done_testing;
|
done_testing;
|
||||||
exit;
|
|
||||||
|
7
t/lib/samples/dupekeys/prefix_bug_1214114.sql
Normal file
7
t/lib/samples/dupekeys/prefix_bug_1214114.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CREATE TABLE `t` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`a` varchar(200) DEFAULT NULL,
|
||||||
|
`b` decimal(22,0) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `b` (`b`,`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
Reference in New Issue
Block a user