mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-18 08:24:06 +00:00
Fix for 1047335: SchemaIterator fails when it encounters a crashed table
This commit is contained in:
@@ -352,7 +352,22 @@ sub _iterate_dbh {
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = $tp->get_create_table($dbh, $self->{db}, $tbl);
|
||||
local $EVAL_ERROR;
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
# SHOW CREATE TABLE failed. This is a bit puzzling;
|
||||
# maybe the table got dropped, or crashed. Not much we can
|
||||
# do about it; If the table is missing, just PTDEBUG it, but
|
||||
# otherwise, warn with the error.
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user