Branch Coverage

blib/lib/DBI/Gofer/Execute.pm
Criterion Covered Total %
branch 99 156 63.4


line true false branch
145 0 6454 if (++$stats->{'_requests_served'} % 1000 == 0 and my $max_cached_dbh_per_drh = $self->{'max_cached_dbh_per_drh'})
150 0 0 unless my $CK = $drh->{'CachedKids'}
151 0 0 unless keys %$CK > $max_cached_dbh_per_drh
152 0 0 if $driver eq 'Gofer'
161 3095 3359 if $ENV{'DBI_AUTOPROXY'}
171 0 6454 unless $dsn = $self->forced_connect_dsn || $dsn || $self->default_connect_dsn
213 0 6428 if $local_log
217 2900 3528 if (my $random = $self->{'forced_gofer_random'} || $ENV{'DBI_GOFER_RANDOM'})
222 0 6428 if ($CK and keys %$CK > $self->{'max_cached_sth_per_dbh'})
245 1599 4855 if ($eval_error)
247 1597 2 if ($errstr) { }
248 1597 0 if $errstr
256 1599 4855 if $errstr
261 3996 2432 if $dbh and $dbh->{'Executed'}
284 0 22 if $local_log
289 0 6454 if (my $check_request_sub = $self->check_request_sub)
290 0 0 unless $request = &$check_request_sub($request, $self)
295 0 6454 if $version < 0.009116 or $version >= 1
298 2769 3685 $request->is_sth_request ? :
304 0 6454 if (my $check_response_sub = $self->check_response_sub)
307 0 0 if ref $new
312 22 6432 if @warnings
336 26 3659 unless $dbh
339 715 2944 if (my $dbh_attributes = $request->dbh_attributes)
343 0 3659 if ($rv_ref and my $lid_args = $request->dbh_last_insert_id_args)
349 10 3649 if ($rv_ref and UNIVERSAL::isa($rv_ref->[0], 'DBI::st'))
367 3428 0 if ($req_attr_names[0] eq '*')
396 2723 3428 if ($dbh = $h->{'Database'}) { }
399 62 2661 if $dbh->{'private_gofer_std_attr_names_sth'}
405 104 3324 if $h->{'private_gofer_std_attr_names_dbh'}
413 2317 3668 if (my $pai = $h->private_attribute_info) { }
417 1577 2091 unless $extra_attr{$driver_name}{$h_type}
419 0 5985 if (my $fra = $self->{'forced_response_attributes'})
420 0 0 unless $fra->{$driver_name}{$h_type}
447 2271 442 if (my $calls = $request->sth_method_calls)
455 0 2689 if (my $lid_args = $request->dbh_last_insert_id_args)
464 0 2769 unless $dbh
466 0 2769 if defined $last_insert_id
472 2713 56 if ($sth)
479 2713 56 if (my $dbh_attributes = $request->dbh_attributes)
483 2113 656 if (my $dbh_attr = $extra_attr{$dbh->{'Driver'}{'Name'}}{'dbh_after_sth'})
486 2721 48 if $dbh_attr_set and %$dbh_attr_set
503 2713 10 if (my $sth_result_attr = $request->sth_result_attr)
514 2080 643 if (my $rows = $rs->{'rowset'})
517 0 2723 if $self->{'forced_single_resultset'}
518 2723 0 unless $sth->more_results or $sth->{'syb_more_results'}
524 38 2685 if $row_count > ($stats->{'rows_returned_max'} || 0)
528 0 2723 if $@
540 2324 399 if ($meta{'NUM_OF_FIELDS'} || 0) > 0
547 244 2479 if ($@)
561 0 3428 unless my $ImplementorClass = $dbh->{'ImplementorClass'}
566 45884 156368 if $imp_sub != $dbi_sub
582 2893 7 if ($callbacks->{'_dbi_gofer_random_spec'} || '') eq $dbi_gofer_random
589 6 8 if ($spec =~ /^fail=(-?[.\d]+)%?$/)
594 0 8 if ($spec =~ /^err=(-?\d+)$/)
599 1 7 if ($spec =~ /^delay([.\d]+)=(-?[.\d]+)%?$/) { }
0 7 elsif (not $spec =~ /^(\w+|\*)$/) { }
611 0 0 if ($callbacks->{$method} and $prev->{$method} and $callbacks->{$method} != $prev->{$method})
615 0 7 unless (defined $fail_percent or defined $delay_percent)
623 7 0 if @spec_note
634 6 1 if $fail_percent
635 1 6 if $delay_percent
640 0 2880 $delay_percent < 0 ? :
20 2880 $delay_percent > 0 ? :
642 1000 20 $fail_percent < 0 ? :
1880 1020 $fail_percent > 0 ? :
646 11 2889 if ($delay)
650 11 0 $delay_percent % 2 == 1 ? :
653 1487 1413 if ($fail)
674 0 0 unless $request
679 0 0 if $frozen_request and length $frozen_request > ($stats->{'frozen_request_max_bytes'} || 0)
682 0 0 if $frozen_response and length $frozen_response > ($stats->{'frozen_response_max_bytes'} || 0)
685 0 0 if (my $track_recent = $self->{'track_recent'})
686 0 0 $store_meta ? :
694 0 0 if not $frozen_request and $request
696 0 0 unless $frozen_response
699 0 0 if not $response or $response->err
703 0 0 if @$queue > $track_recent