Branch Coverage

lib/Mail/Toaster/Mysql.pm
Criterion Covered Total %
branch 0 182 0.0


line true false branch
17 0 0 unless $dot->{'autocommit'}
18 0 0 if $dot->{'autocommit'} ne ''
25 0 0 unless (ref $dot eq 'HASH')
42 0 0 if $verbose
48 0 0 if (-e "$backupdir/$yy/$mm/$dd/$backupfile" or -e "$backupdir/$yy/$mm/$dd/$backupfile.gz")
71 0 0 if ($db_mv->{'log_bin'} ne 'ON')
96 0 0 if $@
99 0 0 unless (my $dbh = 'DBI'->connect($dsn, $v{'user'}, $v{'pass'}, {'RaiseError', 0, 'AutoCommit', $ac}))
101 0 0 if $verbose
102 0 0 unless $warn
128 0 0 if (my $sth = $self->query($dbh, 'SHOW DATABASES'))
131 0 0 if ($sth->err) { }
146 0 0 if (-e '/etc/my.cnf')
153 0 0 if (-e '/usr/local/share/mysql/my-large.cnf')
157 0 0 if (-e '/etc/my.cnf') { }
183 0 0 if (my $sth = $self->query($dbh, $sql))
196 0 0 unless (my $ver = $self->conf->{'install_mysql'})
201 0 0 if (lc $Mail::Toaster::Mysql::OSNAME eq 'darwin')
206 0 0 if (lc $Mail::Toaster::Mysql::OSNAME eq 'freebsd')
218 0 0 if $Mail::Toaster::Mysql::OSNAME ne 'darwin'
220 0 0 if ($self->util->find_bin('port', 'verbose', 0))
233 0 0 if ($self->conf->{'install_mysqld'})
254 0 0 if $self->conf->{'install_mysqld'}
258 0 0 if $self->freebsd->is_port_installed($_, 'verbose', 0)
261 0 0 if ($installed == scalar @ports)
268 0 0 if $self->conf->{'install_mysql_optimized'}
271 0 0 if ($dir and $dir ne '/var/db/mysql')
277 0 0 if ($ver =~ /^3|323$/) { }
0 0 elsif ($ver =~ /^4|40$/) { }
0 0 elsif ($ver =~ /^41|4.1$/) { }
0 0 elsif ($ver =~ /^50|5.0$/) { }
0 0 elsif ($ver =~ /^51|5.1$/) { }
0 0 elsif ($ver =~ /^55|5.5$/) { }
286 0 0 if $self->conf->{'install_mysqld'}
295 0 0 unless $self->freebsd->is_port_installed('mysql-client')
298 0 0 unless ($self->conf->{'install_mysqld'})
303 0 0 unless $self->freebsd->is_port_installed('mysql-server')
319 0 0 if ($curs[0] > $mins[0])
320 0 0 if ($curs[1] > $mins[1])
321 0 0 if ($curs[2] > $mins[2])
333 0 0 unless -e $dotfile
335 0 0 unless (-r $dotfile)
343 0 0 if $verbose
346 0 0 if /^#/
349 0 0 if ($gotit) { }
350 0 0 if ($line =~ /^\[/)
351 0 0 if $verbose
353 0 0 if $1
356 0 0 if $verbose
357 0 0 if ($line eq $start)
364 0 0 if ($verbose)
376 0 0 unless ($self->conf->{'install_phpmyadmin'})
384 0 0 if ($Mail::Toaster::Mysql::OSNAME eq 'freebsd') { }
0 0 elsif ($Mail::Toaster::Mysql::OSNAME eq 'darwin') { }
390 0 0 unless (-d $dir)
400 0 0 unless (-e $dir)
406 0 0 unless (-e "$dir/config.inc.php")
418 0 0 if (/(\$cfg\['blowfish_secret'\] =) ''/) { }
0 0 elsif (/(\$cfg\['Servers'\]\[\$i\]\['controluser'\])/) { }
0 0 elsif (/(\$cfg\['Servers'\]\[\$i\]\['controlpass'\])/) { }
0 0 elsif (/(\$cfg\['Servers'\]\[\$i\]\['auth_type'\])/) { }
434 0 0 if ($self->connect($dot, 1)) { }
484 0 0 if ($sth = $dbh->prepare($query))
485 0 0 unless $sth->execute
500 0 0 if ($self->util->yes_or_no("\n\t$query \n\n Does this query look correct? "))
503 0 0 if ($sth = $self->query($dbh, $query))
505 0 0 if $verbose
516 0 0 unless ($dot->{'user'})
521 0 0 if (length $dot->{'user'} > 16)
526 0 0 unless ($dot->{'pass'})
531 0 0 if (length $dot->{'pass'} > 32)
542 0 0 if $verbose
544 0 0 if ($drh) { }
553 0 0 unless ($drh)
564 0 0 if ($verbose)
566 0 0 $rc ? :
569 0 0 if ($rc) { }
583 0 0 if (-e '/tmp/mysql.sock' or -e '/opt/local/var/run/mysqld/mysqld.sock')
591 0 0 if (not -e $start and -e "$etc/rc.d/mysql-server.sh")
594 0 0 if (not -e $start and -e "$etc/init.d/mysql")
595 0 0 if (not -e $start and -e "$etc/init.d/mysql-server")
598 0 0 if (not -e $start and -e "$etc/rc.d/mysql")
599 0 0 if (not -e $start and -e "$etc/rc.d/mysql.sh")
603 0 0 if (-x $start) { }
619 0 0 unless ($dbh)
624 0 0 if (my $sth = $self->query($dbh, 'SHOW STATUS'))
640 0 0 if $verbose
642 0 0 if (my $sth = $self->query($dbh, 'FLUSH TABLES WITH READ LOCK'))
651 0 0 if $verbose
655 0 0 unless $sth = $self->query($dbh, $query)
666 0 0 if ($sth = $self->query($dbh, 'SELECT VERSION()'))