Branch Coverage: blib/lib/MySQL/Util.pm

# Branch Coverage

File: | blib/lib/MySQL/Util.pm
Coverage: | 77.4%

line | % | coverage | branch
--- | --- | --- | ---
169 | 50 | T | F | if (defined $ENV{'VERBOSE_FUNCS'})
181 | 100 | T | F | if (not $dbh) { }
202 | 50 | T | F | if ($schema)
241 | 100 | T | F | if ($$fk_href{'COLUMN_NAME'} eq $column)
256 | 100 | T | F | if (defined $self->$cache->{$table})
284 | 100 | T | F | if ($fq)
285 | 100 | T | F | if ($table =~ /\w\.\w/) { }
| 100 | T | F | elsif ($schema) { }
295 | 50 | T | F | if ($table =~ /^(\w+)\.(\w+)$/)
298 | 50 | T | F | if $curr ne $1
316 | 50 | T | F | if ($table =~ /^(\w+)\.(\w+)$/)
338 | 100 | T | F | if ($item =~ /CONSTRAINT `$fk` FOREIGN KEY/)
354 | 50 | T | F | unless my $table = $a{'table'}
355 | 50 | T | F | unless my $column = $a{'column'}
361 | 100 | T | F | if ($$col_href{'FIELD'} eq $column)
385 | 50 | T | F | if ($self->_verbose_funcs->{$key})
387 | 0 | T | F | if $func_counter
413 | 50 | T | F | if ($self->_verbose_funcs->{$key})
415 | 0 | T | F | if $func_counter
496 | 50 | T | F | unless ($self->_column_exists('table', $table, 'column', $column))
503 | 100 | T | F | if ($$col_href{'FIELD'} =~ /^$column$/i)
538 | 100 | T | F | if (defined $self->$cache->{$table})
574 | 50 | T | F | if (not defined $table) { }
576 | 50 | T | F | unless defined $tables_aref
623 | 100 | T | F | unless my $table = shift()
631 | 100 | T | F | if ($$cons{$con_name}[0]{'CONSTRAINT_TYPE'} eq 'UNIQUE')
663 | 100 | T | F | unless ($table =~ /\./)
671 | 100 | T | F | if ($$indexes{$index}[0]{'NON_UNIQUE'} == 0)
690 | 50 | T | F | if ($self->has_ak($table))
726 | 100 | T | F | if (defined $table)
728 | 50 | T | F | if ($schema)
729 | 0 | T | F | if ($unfq_schema ne $schema)
741 | 100 | T | F | if (defined $fq_table)
745 | 100 | T | F | if ($cons_name eq $name)
753 | 50 | T | F | unless $schema
762 | 50 | T | F | if (defined $self->$cache->{$t})
766 | 100 | T | F | if ($cons_name eq $name)
780 | 0 | T | F | unless ($self->span)
794 | 0 | T | F | if ($cons_name eq $name)
838 | 100 | T | F | if (defined $self->$cache->{$table})
842 | 100 | T | F | unless $self->table_exists($table)
857 | 50 | T | F | unless ($self->span)
873 | 100 | T | F | unless (defined $$href{$name})
892 | 100 | T | F | if @_
920 | 100 | T | F | unless my $table = shift()
922 | 100 | T | F | unless ($table =~ /\./)
928 | 100 | T | F | if (defined $$self{$cache}{$table})
943 | 50 | T | F | if ($parent_table eq $table)
946 | 100 | T | F | if ($parent_depth >= $depth)
980 | 50 | T | F | if $name and $name ne $fk_name
1016 | 100 | T | F | if (defined $table and not $table =~ /\./)
1021 | 100 | T | F | if (not defined $table) { }
1023 | 50 | T | F | unless defined $tables_aref
1043 | 100 | T | F | if ($type eq 'FOREIGN KEY')
1071 | 100 | T | F | unless ($table =~ /\./)
1085 | 50 | T | F | if (scalar @con_cols == scalar @index_cols)
1089 | 100 | T | F | if ($index_cols[$i]{'COLUMN_NAME'} ne $con_cols[$i]{'COLUMN_NAME'})
1097 | 100 | T | F | if ($match)
1136 | 100 | T | F | unless my $table = shift()
1138 | 100 | T | F | unless ($table =~ /\./)
1149 | 100 | T | F | unless (exists $h{$key_name})
1175 | 100 | T | F | if ($depth > $max)
1198 | 50 | T | F | unless ($table =~ /\./)
1211 | 100 | T | F | if $type eq 'PRIMARY KEY'
1212 | 100 | T | F | if $type eq 'FOREIGN KEY'
1213 | 50 | T | F | if $type eq 'UNIQUE'
1241 | 50 | T | F | unless ($table =~ /\./)
1252 | 100 | T | F | if $name eq 'PRIMARY'
1253 | 100 | T | F | if defined $$ak{$name}
1254 | 100 | T | F | if defined $$fk{$name}
1279 | 50 | T | F | unless ($table =~ /\./)
1286 | 100 | T | F | if ($$cons{$con_name}[0]{'CONSTRAINT_TYPE'} eq 'PRIMARY KEY')
1318 | 100 | T | F | if ($name eq 'PRIMARY')
1338 | 50 | T | F | if ($self->has_pk($table))
1424 | 50 | T | F | if ($self->has_pk($table))
1435 | 100 | T | F | if ($$col_desc_href{'EXTRA'} =~ /auto/)
1460 | 100 | T | F | if ($$desc{'NULL'} eq 'YES')
1486 | 100 | T | F | if ($$fk_href{'COLUMN_NAME'} eq $column)
1518 | 100 | T | F | if $name and $name ne $con_name
1544 | 50 | T | F | if ($ref_fq_table eq $fq_table)
1561 | 100 | T | F | unless my $table = shift()
1564 | 100 | T | F | unless ($table =~ /\./)
1571 | 100 | T | F | if ($schema ne $self->_schema)
1586 | 100 | T | F | if ($schema ne $self->_schema)