mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00
PT-1705 Added exit codes to pt-osc
This commit is contained in:
@@ -8307,26 +8307,25 @@ use constant {
|
||||
INVALID_PLUGIN_FILE => 5,
|
||||
INVALID_ALTER_FK_METHOD => 6,
|
||||
INVALID_KEY_SIZE => 7,
|
||||
INVALID_CHUNKS_COUNT => 8, # of chunks in master is != than in slaves
|
||||
CANNOT_DETERMINE_KEY_SIZE => 9,
|
||||
NOT_SAFE_TO_ASCEND => 10,
|
||||
ERROR_CREATING_NEW_TABLE => 11,
|
||||
ERROR_ALTERING_TABLE => 12,
|
||||
ERROR_CREATING_TRIGGERS => 13,
|
||||
ERROR_RESTORING_TRIGGERS => 15,
|
||||
ERROR_SWAPPING_TABLES => 16,
|
||||
ERROR_UPDATING_FKS => 17,
|
||||
ERROR_DROPPING_OLD_TABLE => 18,
|
||||
UNSUPORTED_OPERATION => 19,
|
||||
MYSQL_CONNECTION_ERROR => 20,
|
||||
LOST_MYSQL_CONNECTION => 21,
|
||||
NOT_SAFE_TO_ASCEND => 9,
|
||||
ERROR_CREATING_NEW_TABLE => 10,
|
||||
ERROR_ALTERING_TABLE => 11,
|
||||
ERROR_CREATING_TRIGGERS => 12,
|
||||
ERROR_RESTORING_TRIGGERS => 13,
|
||||
ERROR_SWAPPING_TABLES => 14,
|
||||
ERROR_UPDATING_FKS => 15,
|
||||
ERROR_DROPPING_OLD_TABLE => 16,
|
||||
UNSUPORTED_OPERATION => 17,
|
||||
MYSQL_CONNECTION_ERROR => 18,
|
||||
LOST_MYSQL_CONNECTION => 19,
|
||||
};
|
||||
|
||||
sub _die {
|
||||
my ($msg, $exit_status) = @_;
|
||||
warn "msg: $msg",;
|
||||
warn "exit_status: $exit_status";
|
||||
#$exit_status ||= 255;
|
||||
$exit_status ||= 255;
|
||||
chomp ($msg);
|
||||
print "$msg\n";
|
||||
exit $exit_status;
|
||||
|
@@ -54,7 +54,6 @@ $sb->load_file('master', "t/pt-online-schema-change/samples/pt-1574.sql");
|
||||
);
|
||||
|
||||
my $sql_mode = $dbh->selectcol_arrayref('SELECT @@sql_mode');
|
||||
warn Data::Dumper::Dumper($sql_mode);
|
||||
|
||||
isnt(
|
||||
$exit_status,
|
||||
@@ -76,6 +75,7 @@ like(
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
diag($output);
|
||||
|
||||
is(
|
||||
$exit_status,
|
||||
|
@@ -39,3 +39,5 @@ INSERT INTO `test`.`t2` VALUES
|
||||
(1978918050,'Louis Gray Jr. Sr. I II I','2017-11-01 22:10:39'),
|
||||
(1275940242,'Lois Spencer','2018-02-22 01:01:38'),
|
||||
(NULL,"aaa",NULL);
|
||||
|
||||
ANALYZE TABLE `test`.`t1`, `test`.`t2`;
|
||||
|
Reference in New Issue
Block a user