Branch Coverage

blib/lib/Mojo/MySQL5/Connection.pm
Criterion Covered Total %
branch 60 144 41.6


line true false branch
86 0 0 if $len >= 1 and $len <= 4
87 0 0 if $len == 6 or $len = 8
95 5 6 $int <= 16777215 ? :
6 11 $int <= 65535 ? :
9 17 $int <= 250 ? :
3 26 !defined($int) ? :
105 10 2 defined $str ? :
111 81 28 $chew ? :
112 78 31 if $len == 1
113 25 6 if $len >= 2 and $len <= 4
114 0 6 unless $len == 8
117 2 4 $hi ? :
128 6 0 $first == 254 ? :
5 6 $first == 253 ? :
6 11 $first == 252 ? :
3 17 $first == 251 ? :
21 20 $first < 251 ? :
139 13 1 defined $len ? :
146 0 3 unless defined $str
154 0 8 if $len > length $$self{'incoming'}
166 0 0 if $database
167 0 0 if $self->url->options->{'multi_statements'}
168 0 0 if $self->url->options->{'found_rows'}
178 0 0 if ($password)
186 0 0 $self->url->options->{'utf8'} // 1 ? :
218 0 1 unless $first == 255
237 1 1 if $first == 255
238 0 1 unless $first == 0
254 0 1 if $self->state eq 'auth'
255 0 1 if $self->state eq 'query'
262 0 1 if $first == 255
263 0 1 if $first == 0
276 0 2 if $first == 255
277 0 2 unless $first == 254
288 1 1 if ($self->state eq 'field') { }
1 0 elsif ($self->state eq 'result') { }
294 0 1 if ($$self{'status_flags'} & 8) { }
308 0 2 if $first == 255
309 1 1 if $first == 254
310 0 1 if $first > 250
327 1 0 if ($self->url->options->{'utf8'} // 1)
343 0 3 if $first == 255
344 1 2 if $first == 254
349 2 0 if $$self{'column_info'}[$_]{'character_set'} == {ASCII => 65, BINARY => 63, UTF8 => 33}->{'UTF8'}
362 0 1 if $first == 255
389 0 1 unless $$self{'protocol_version'} == 10
391 0 1 unless $auth_plugin_name eq 'mysql_native_password'
393 0 1 unless $auth_len == 21 and length $$self{'auth_plugin_data'} == 20
411 0 0 $_[1] ? :
416 0 0 if length $$self{'incoming'} < 4
424 0 0 unless $next
425 0 0 if (substr($next, 0, 6) eq '_send_') { }
0 0 elsif (substr($next, 0, 6) eq '_recv_') { }
430 0 0 if $writeonly
432 0 0 if $$self{'seq'} and $seq != ($$self{'seq'} + 1 & 255)
434 0 0 if $len > length $$self{'incoming'}
447 0 0 unless $cb
448 0 0 if $self->url->options->{'query_timeout'}
458 0 0 if ($self->state eq 'idle') { }
461 0 0 $cb ? :
480 0 0 $cb ? :
489 0 0 unless exists {connect => {auth => '_recv_ok', connected => '_recv_handshake', handshake => '_send_auth'}, disconnect => {idle => '_send_quit', quit => '_recv_ok'}, ping => {idle => '_send_ping', ping => '_recv_ok'}, query => {field => '_recv_field', idle => '_send_query', query => '_recv_query_responce', result => '_recv_row'}}->{$cmd}
490 0 0 unless exists {connect => {auth => '_recv_ok', connected => '_recv_handshake', handshake => '_send_auth'}, disconnect => {idle => '_send_quit', quit => '_recv_ok'}, ping => {idle => '_send_ping', ping => '_recv_ok'}, query => {field => '_recv_field', idle => '_send_query', query => '_recv_query_responce', result => '_recv_row'}}->{$cmd}{$self->state}
494 0 0 unless $cb
495 0 0 $self->state eq 'idle' ? :
505 0 0 unless $cb
520 0 0 $cb ? :
529 0 0 unless $cb
536 0 0 $self->state eq 'disconnected' ? :
547 0 1 if $self->state eq 'idle' and $$self{'socket'}
561 0 0 if $_ eq $flag
571 0 0 if $flag eq $_