diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index eabd33c5..b4e51147 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -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; diff --git a/t/pt-online-schema-change/pt-1574.t b/t/pt-online-schema-change/pt-1574.t index 4a2df5d8..2248c5d3 100644 --- a/t/pt-online-schema-change/pt-1574.t +++ b/t/pt-online-schema-change/pt-1574.t @@ -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, diff --git a/t/pt-online-schema-change/samples/pt-1574.sql b/t/pt-online-schema-change/samples/pt-1574.sql index 2e5fd368..10987e36 100644 --- a/t/pt-online-schema-change/samples/pt-1574.sql +++ b/t/pt-online-schema-change/samples/pt-1574.sql @@ -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`;