mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-11 01:01:36 +08:00
PT-1574 Added a test case
This commit is contained in:
@@ -24,7 +24,7 @@ use File::Temp qw/ tempdir /;
|
||||
if ($sandbox_version lt '5.7') {
|
||||
plan skip_all => 'This test needs MySQL 5.7+';
|
||||
} else {
|
||||
plan tests => 3;
|
||||
plan tests => 5;
|
||||
}
|
||||
|
||||
require "$trunk/bin/pt-online-schema-change";
|
||||
@@ -65,6 +65,27 @@ like(
|
||||
"PT-1544 Message you need an unique index.",
|
||||
);
|
||||
|
||||
($output, $exit_status) = full_output(
|
||||
sub { pt_online_schema_change::main(@args, "$dsn,D=test,t=t2",
|
||||
'--execute', "--chunk-index", "idx_id", "--chunk-size", "1",
|
||||
"--nocheck-plan", '--alter', "engine=innodb",
|
||||
),
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
isnt(
|
||||
$exit_status,
|
||||
0,
|
||||
"PT-1544 There is no unique index exit status",
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/at least one UNIQUE and NOT NULLABLE index/s,
|
||||
"PT-1544 Message you need an unique index.",
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
||||
Reference in New Issue
Block a user