diff --git a/bin/pt-duplicate-key-checker b/bin/pt-duplicate-key-checker index 87a70ddc..761bda62 100755 --- a/bin/pt-duplicate-key-checker +++ b/bin/pt-duplicate-key-checker @@ -3339,7 +3339,7 @@ sub next { } sub _iterate_files { - my ( $self ) = @_; + my ( $self ) = @_; if ( !$self->{fh} ) { my ($fh, $file) = $self->{file_itr}->(); diff --git a/bin/pt-index-usage b/bin/pt-index-usage index b5fc68fd..cdaf0b82 100755 --- a/bin/pt-index-usage +++ b/bin/pt-index-usage @@ -4056,7 +4056,7 @@ sub next { } sub _iterate_files { - my ( $self ) = @_; + my ( $self ) = @_; if ( !$self->{fh} ) { my ($fh, $file) = $self->{file_itr}->(); diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index f87f8610..e124aa69 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -1510,7 +1510,7 @@ sub name { sub DESTROY { my ($self) = @_; - if ( $self->{dbh} ) { + if ( $self->{dbh} && ref($self->{dbh}) ) { PTDEBUG && _d('Disconnecting dbh', $self->{dbh}, $self->{name}); $self->{dbh}->disconnect(); } @@ -4704,7 +4704,6 @@ sub next { sub _iterate_files { my ( $self ) = @_; - my $q = $self->{Quoter}; if ( !$self->{fh} ) { my ($fh, $file) = $self->{file_itr}->(); diff --git a/bin/pt-table-sync b/bin/pt-table-sync index e8a7dc1e..fed2018c 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -6897,7 +6897,7 @@ sub next { } sub _iterate_files { - my ( $self ) = @_; + my ( $self ) = @_; if ( !$self->{fh} ) { my ($fh, $file) = $self->{file_itr}->(); diff --git a/lib/SchemaIterator.pm b/lib/SchemaIterator.pm index c63c7eed..3cb320f3 100644 --- a/lib/SchemaIterator.pm +++ b/lib/SchemaIterator.pm @@ -232,7 +232,6 @@ sub next { sub _iterate_files { my ( $self ) = @_; - my $q = $self->{Quoter}; if ( !$self->{fh} ) { my ($fh, $file) = $self->{file_itr}->();