PT-105 Fixed pt-table-checksum fails if a database is dropped while the tool is running

This commit is contained in:
Carlos Salguero
2017-03-16 14:42:26 -03:00
parent 7b0d02b8b8
commit 148be75a0e
6 changed files with 124 additions and 5 deletions

View File

@@ -353,7 +353,14 @@ sub _iterate_dbh {
&& $self->_resume_from_table($tbl)
&& $self->table_is_allowed($self->{db}, $tbl);
}
@{$dbh->selectall_arrayref($sql)};
eval { @{$dbh->selectall_arrayref($sql)}; };
if ($EVAL_ERROR) {
warn "Skipping $self->{db}...";
$self->{db} = undef;
next;
}
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
$self->{tbls} = \@tbls;
}