Branch Coverage

blib/lib/MySQL/Diff.pm
Criterion Covered Total %
branch 0 142 0.0


line true false branch
61 0 0 if ($hash{'debug'})
62 0 0 if ($hash{'debug_file'})
86 0 0 unless $inx == 1 or $inx == 2
88 0 0 ref $name eq 'MySQL::Diff::Database' ? :
125 0 0 if (my $table2 = $self->db2->table_by_name($name)) { }
131 0 0 unless $self->{'opts'}{'only-both'} or $self->{'opts'}{'keep-old-tables'}
139 0 0 unless ($self->db1->table_by_name($name))
143 0 0 unless $self->{'opts'}{'only-both'}
150 0 0 if (@changes)
151 0 0 if (not $self->{'opts'}{'list-tables'}) { }
175 0 0 $self->{'opts'}{$_} eq '1' ? :
177 0 0 if $opt_text
201 0 0 if @changes
213 0 0 unless $fields1 or $fields2
217 0 0 if ($fields1)
222 0 0 if ($fields2 and $f2) { }
223 0 0 if ($self->{'opts'}{'tolerant'})
228 0 0 if ($f1 ne $f2)
229 0 0 if (not $self->{'opts'}{'tolerant'} or not $f1 =~ /$f2\(\d+,\d+\)/ and $f1 ne "$f2 DEFAULT '' NOT NULL" and $f1 ne "$f2 NOT NULL")
237 0 0 unless $self->{'opts'}{'no-old-defs'}
245 0 0 unless $self->{'opts'}{'no-old-defs'}
252 0 0 if ($fields2)
254 0 0 unless ($fields1 and $fields1->{$field})
257 0 0 if ($table2->is_auto_inc($field))
258 0 0 if ($table2->isa_primary($field)) { }
0 0 elsif ($table2->is_unique($field)) { }
280 0 0 unless $indices1 or $indices2
284 0 0 if ($indices1)
287 0 0 $table1->is_fulltext($index) ? :
0 0 $table1->is_unique($index) ? :
290 0 0 if ($indices2 and $indices2->{$index}) { }
291 0 0 if ($indices1->{$index} ne $indices2->{$index} or ($table1->is_unique($index) xor $table2->is_unique($index)) or ($table1->is_fulltext($index) xor $table2->is_fulltext($index)))
296 0 0 $table2->is_fulltext($index) ? :
0 0 $table2->is_unique($index) ? :
301 0 0 unless $self->{'opts'}{'no-old-defs'}
308 0 0 $auto ? :
311 0 0 unless $self->{'opts'}{'no-old-defs'}
318 0 0 if ($indices2)
320 0 0 if $indices1 and $indices1->{$index}
322 0 0 if not $table2->isa_primary($index) and $table2->is_unique($index) and _key_covers_auto_col($table2, $index)
327 0 0 $table2->is_unique($index) ? :
343 0 0 unless $primary1 or $primary2
347 0 0 if ($primary1 and not $primary2)
351 0 0 unless $self->{'opts'}{'no-old-defs'}
355 0 0 if (not $primary1 and $primary2)
357 0 0 if _key_covers_auto_col($table2, $primary2)
361 0 0 if ($primary1 ne $primary2)
364 0 0 $auto ? :
366 0 0 unless $self->{'opts'}{'no-old-defs'}
368 0 0 if $auto
383 0 0 unless $fks1 or $fks2
387 0 0 if ($fks1)
391 0 0 if ($fks2 and $fks2->{$fk}) { }
392 0 0 if ($fks1->{$fk} ne $fks2->{$fk})
397 0 0 unless $self->{'opts'}{'no-old-defs'}
405 0 0 unless $self->{'opts'}{'no-old-defs'}
412 0 0 if ($fks2)
414 0 0 if $fks1 and $fks1->{$fk}
434 0 0 unless $table->field($field) =~ /auto_increment/i
435 0 0 if $table->isa_index($field)
436 0 0 if $primary and $table->isa_primary($field)
454 0 0 if $table->is_auto_inc($field)
472 0 0 unless $options1 or $options2
476 0 0 if ($self->{'opts'}{'tolerant'})
483 0 0 if ($options1 ne $options2)
485 0 0 unless $self->{'opts'}{'no-old-defs'}
501 0 0 unless $auth{$auth}
504 0 0 if ($arg =~ /^db:(.*)/)
508 0 0 if ($self->{'opts'}{'dbh'} or $self->{'opts'}{"host$authnum"} or $self->{'opts'}{"port$authnum"} or $self->{'opts'}{"user$authnum"} or $self->{'opts'}{"password$authnum"} or $self->{'opts'}{"socket$authnum"})
517 0 0 if (-f $arg)
524 0 0 if ($dbs{$arg})