| line |
true |
false |
branch |
|
181
|
0 |
1 |
unless eval 'use Digest::SHA qw(sha1); 1' or eval 'use Digest::SHA1 qw(sha1); 1' |
|
446
|
0 |
0 |
if ($k eq 'row') { } |
|
|
0 |
0 |
elsif ($k eq 'server_capa') { } |
|
|
0 |
0 |
elsif ($k eq 'crypt_seed') { } |
|
482
|
0 |
0 |
if exists $_[1] |
|
483
|
0 |
0 |
if (length $_) |
|
485
|
0 |
0 |
unless $x <= 253 |
|
499
|
0 |
0 |
if exists $_[1] |
|
500
|
0 |
0 |
if length $_ and ord $_ == 254 |
|
512
|
0 |
0 |
if exists $_[1] |
|
513
|
0 |
0 |
if length $_ |
|
549
|
0 |
0 |
if exists $_[1] |
|
550
|
0 |
0 |
unless 4 <= length $_ |
|
567
|
0 |
0 |
if exists $_[1] |
|
568
|
0 |
0 |
unless $_[0]{'packet_size'} <= length $_ |
|
582
|
0 |
0 |
if exists $_[1] |
|
583
|
0 |
0 |
unless length $_ |
|
585
|
0 |
0 |
if ($first < 251) { } |
|
|
0 |
0 |
elsif ($first == 251) { } |
|
|
0 |
0 |
elsif ($first == 252) { } |
|
|
0 |
0 |
elsif ($first == 253) { } |
|
|
0 |
0 |
elsif ($first == 254) { } |
|
596
|
0 |
0 |
unless 3 <= length $_ |
|
602
|
0 |
0 |
unless 5 <= length $_ |
|
608
|
0 |
0 |
unless 9 <= length $_ |
|
629
|
0 |
0 |
if exists $_[1] |
|
632
|
0 |
0 |
if ($i <= 0) { } |
|
|
0 |
0 |
elsif (not defined $length) { } |
|
|
0 |
0 |
elsif ($i + $length <= length $_) { } |
|
669
|
0 |
0 |
if exists $_[1] |
|
670
|
0 |
0 |
unless $_[0]{'packet_size'} <= length $_ |
|
684
|
0 |
0 |
if $@ |
|
727
|
0 |
0 |
if exists $_[1] |
|
729
|
0 |
0 |
unless $n <= length $_ |
|
730
|
0 |
0 |
do {
my $type = ord $_;
if ($type == 255) {
return -1 unless 3 <= $n;
substr $_, 0, 1, '';
$_[0]{'error'} = 1;
$_[0]{'errno'} = unpack('v', substr($_, 0, 2, ''));
$_[0]{'message'} = substr($_, 0, $n - 3, '');
$_[0]{'sqlstate'} = $_[0]{'message'} =~ s/^#// ? substr($_[0]{'message'}, 0, 5, '') : '';
$n;
}
elsif ($type == 254 and $n < 9) {
if ($n == 1) {
substr $_, 0, 1, '';
$_[0]{'end'} = 1;
$_[0]{'warning_count'} = 0;
$_[0]{'server_status'} = 0;
1;
}
elsif ($n == 5) {
substr $_, 0, 1, '';
$_[0]{'end'} = 1;
$_[0]{'warning_count'} = unpack('v', substr($_, 0, 2, ''));
$_[0]{'server_status'} = unpack('v', substr($_, 0, 2, ''));
5;
}
else {
return -1;
};
}
elsif ($type > 0) {
my $i = 0;
my $j;
0 >= ($j = mysql_decode_varnum($_[0]{'field_count'})) ? (return -1) : ($i += $j);
0 >= ($j = mysql_decode_varnum($_[0]{'extra'})) ? (return -1) : ($i += $j) if $i < $n;
$i;
}
else {
substr $_, 0, 1, '';
my $i = 1;
my $j;
$_[0]{'field_count'} = 0;
0 >= ($j = mysql_decode_varnum($_[0]{'affected_rows'})) ? (return -1) : ($i += $j);
0 >= ($j = mysql_decode_varnum($_[0]{'last_insert_id'})) ? (return -1) : ($i += $j);
$_[0]{'server_status'} = unpack('v', substr($_, 0, 2, ''));
$i += 2;
$_[0]{'warning_count'} = unpack('v', substr($_, 0, 2, ''));
$i += 2;
0 >= ($j = mysql_decode_varstr($_[0]{'message'})) ? (return -1) : ($i += $j) if $i < $n;
$i;
}
} == $n ? : |
|
732
|
0 |
0 |
if ($type == 255) { } |
|
|
0 |
0 |
elsif ($type == 254 and $n < 9) { } |
|
|
0 |
0 |
elsif ($type > 0) { } |
|
733
|
0 |
0 |
unless 3 <= $n |
|
738
|
0 |
0 |
$_[0]{'message'} =~ s/^#// ? : |
|
742
|
0 |
0 |
if ($n == 1) { } |
|
|
0 |
0 |
elsif ($n == 5) { } |
|
763
|
0 |
0 |
0 >= ($j = mysql_decode_varnum($_[0]{'field_count'})) ? : |
|
764
|
0 |
0 |
0 >= ($j = mysql_decode_varnum($_[0]{'extra'})) ? : |
|
|
0 |
0 |
if $i < $n |
|
772
|
0 |
0 |
0 >= ($j = mysql_decode_varnum($_[0]{'affected_rows'})) ? : |
|
773
|
0 |
0 |
0 >= ($j = mysql_decode_varnum($_[0]{'last_insert_id'})) ? : |
|
777
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'message'})) ? : |
|
|
0 |
0 |
if $i < $n |
|
804
|
0 |
0 |
if exists $_[1] |
|
805
|
0 |
0 |
unless $_[0]{'packet_size'} <= length $_ |
|
809
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'catalog'})) ? : |
|
810
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'db'})) ? : |
|
811
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'table'})) ? : |
|
812
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'org_table'})) ? : |
|
813
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'name'})) ? : |
|
814
|
0 |
0 |
0 >= ($j = mysql_decode_varstr($_[0]{'org_name'})) ? : |
|
823
|
0 |
0 |
$i == $_[0]{'packet_size'} ? : |
|
837
|
0 |
0 |
if exists $_[1] |
|
838
|
0 |
0 |
unless $_[0]{'packet_size'} <= length $_ |
|
841
|
0 |
0 |
if 0 >= ($j = mysql_decode_varstr($_[0]{'row'}[$n++])) |
|
843
|
0 |
0 |
$i == $_[0]{'packet_size'} ? : |
|
869
|
0 |
0 |
exists $_[1] ? : |
|
880
|
0 |
0 |
$num <= 4294967295 ? : |
|
|
0 |
0 |
$num <= 65535 ? : |
|
|
0 |
0 |
$num <= 250 ? : |
|
920
|
0 |
0 |
if $flags & 8 |