Check that vars are defined before using them as hashrefs.

This commit is contained in:
Daniel Nichter
2012-07-19 15:33:27 -06:00
parent 97a8ba9518
commit c71f3b15e1
5 changed files with 46 additions and 2 deletions

View File

@@ -3566,7 +3566,7 @@ sub main {
$fks = $tp->get_fks($tbl->{ddl}, {database => $tbl->{db}});
}
next TABLE unless %$keys || %$fks;
next TABLE unless ($keys && %$keys) || ($fks && %$fks);
if ( $o->got('verbose') ) {
print_all_keys($keys, $tbl, \%seen_tbl) if $keys;