| 1 | package MySQL::Binlog_RBR_Data; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use 5.008005; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # be as strict and verbose as possible | ||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | # set version info | ||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | our $VERSION = "1.02"; | |||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use Carp qw( confess croak ); | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | ▶ | sub parse { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse: called CC=13 SCAR=27.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 2 | my ( $class, $handle, $start_position, @interesting_tables ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | my %interesting_tables; | |||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | @interesting_tables{ @interesting_tables } = @_; | |||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 2 | my $pos; | |||||||||||||||||||||||||||||||||||||||||||||||
| 21 | my @transactions; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 2 | my $trans; | |||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | # mysqlbinlog outputs the binlog data between two lines with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | # DELIMITER | ||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | # so start working after the first one | ||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 2 | ▶ | while ( <$handle> ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 188 | ▶ | if ( substr( $_, 0, 5 ) eq '# at ' ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | $pos = 0 + substr( $_, 5 ); | |||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | last | ||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 188 | ▶ | if substr( $_, 0, 9 ) eq 'DELIMITER'; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | # it's an error if we didn't get the DELIMITER, probably | ||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | # not a binlog file or a corrupted one | ||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 2 | ▶ | $_ && substr( $_, 0, 9 ) eq 'DELIMITER' | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$_ and substr($_, 0, 9) eq "DELIMITER"
MC/DC0%0/2
$_ and substr($_, 0, 9) eq "DELIMITER"
$_
substr($_, 0, 9) eq "DELIMITER"
Truth table33%1/3
A and B
A= $_B= substr($_, 0, 9) eq "DELIMITER"
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | or croak "not a binlog file, didn't find DELIMITER"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | # want to start at some position? mysqlbinlog seeks on it, but we | ||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | # must parse the full output until we get at that position | ||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 2 | ▶ | if ( $start_position ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 1 | ▶ | while ( <$handle> ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 43 | ▶ | if ( substr( $_, 0, 5 ) eq '# at ' ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 8 | $pos = 0 + substr( $_, 5 ); | |||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 8 | ▶ | last if $pos >= $start_position; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | # got to EOF? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | last | ||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 42 | ▶ | if substr( $_, 0, 9 ) eq 'DELIMITER'; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 1 | ▶ | if ( $pos < $start_position ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | # no guarantee $. points to 'at' | ||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 0 | croak "position $start_position not found in binlog, last one found was: $pos"; | |||||||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | elsif ( $pos > $start_position ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | croak "position $start_position not found in binlog, next one after was: $pos, at $."; | |||||||||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 2 | my ( $new_row, $old_row, $row ); | |||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 2 | my $end_pos; | |||||||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 9 | ▶ | return sub { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=29 SCAR=36.5
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 9 | ▶ | while ( <$handle> ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | # position update | ||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 55 | ▶ | if ( substr( $_, 0, 5 ) eq '# at ' ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 11 | $pos = 0 + substr( $_, 5 ); | |||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 11 | next; | |||||||||||||||||||||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | # EOF? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | last | ||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 44 | ▶ | if substr( $_, 0, 9 ) eq 'DELIMITER'; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | # new transaction? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | # transactions have a BEGIN and a COMMIT | ||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 42 | ▶ | if ( substr( $_, 0, 5 ) eq 'BEGIN' ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 7 | my %transaction; | |||||||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 7 | ▶ | while ( <$handle> ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | # EOT? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | last | ||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 132 | ▶ | if substr( $_, 0, 6 ) eq 'COMMIT'; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | # end of current record indicated by | ||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | # #<date and time at server> end_log_pos <position> | ||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 125 | ▶ | if ( substr( $_, 0, 2 ) eq '#1' # FIXME in 2020 | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
substr($_, 0, 2) eq "#1" and /^#\d.*end_log_pos (\d+)/
MC/DC50%1/2
substr($_, 0, 2) eq "#1" and /^#\d.*end_log_pos (\d+)/
substr($_, 0, 2) eq "#1"
/^#\d.*end_log_pos (\d+)/
Truth table66%2/3
A and B
A= substr($_, 0, 2) eq "#1"B= /^#\d.*end_log_pos (\d+)/
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | && /^#\d.*end_log_pos (\d+)/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 25 | $end_pos = $1; | |||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 25 | next; | |||||||||||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | # not RBR? not interested | ||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 100 | ▶ | substr( $_, 0, 4 ) eq '### ' | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | or next; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | # RBR statements format: | ||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | # INSERT INTO ... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | # SET | ||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | # values... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | # UPDATE ... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | # WHERE | ||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | # old values... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | # SET | ||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | # new values... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | # DELETE FROM ... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | # WHERE | ||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | # old values... | ||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | # so... SET defines new values | ||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | # WHERE defines old values | ||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 68 | ▶ | if ( $old_row && substr( $_, 4, 5 ) eq 'WHERE' ) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 6 branches
Condition100%3/3
$old_row and substr($_, 4, 5) eq "WHERE"
MC/DC100%2/2
$old_row and substr($_, 4, 5) eq "WHERE"
$old_row
substr($_, 4, 5) eq "WHERE"
Truth table100%3/3
A and B
A= $old_rowB= substr($_, 4, 5) eq "WHERE"
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 6 | $row = $old_row; | |||||||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | ▶ | elsif ( $new_row && substr ( $_, 4, 3 ) eq 'SET' ) { | |||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%3/3
$new_row and substr($_, 4, 3) eq "SET"
MC/DC100%2/2
$new_row and substr($_, 4, 3) eq "SET"
$new_row
substr($_, 4, 3) eq "SET"
Truth table100%3/3
A and B
A= $new_rowB= substr($_, 4, 3) eq "SET"
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 12 | $row = $new_row; | |||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | elsif ( /^### INSERT INTO (\S+)/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 8 | $old_row = $row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 8 | ▶ | if ( ! @interesting_tables | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not @interesting_tables or exists $interesting_tables{$1}
MC/DC0%0/2
not @interesting_tables or exists $interesting_tables{$1}
not @interesting_tables
exists $interesting_tables{$1}
Truth table33%1/3
not(A) or B
A= not @interesting_tablesB= exists $interesting_tables{$1}
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | || exists $interesting_tables{ $1 } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 8 | $new_row = []; | |||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 8 | push @{ $transaction{ $1 } }, [ $new_row ]; | |||||||||||||||||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $new_row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | elsif ( /^### DELETE FROM (\S+)/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 2 | $new_row = $row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 2 | ▶ | if ( ! @interesting_tables | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not @interesting_tables or exists $interesting_tables{$1}
MC/DC0%0/2
not @interesting_tables or exists $interesting_tables{$1}
not @interesting_tables
exists $interesting_tables{$1}
Truth table33%1/3
not(A) or B
A= not @interesting_tablesB= exists $interesting_tables{$1}
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | || exists $interesting_tables{ $1 } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 2 | $old_row = []; | |||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 2 | push @{ $transaction{ $1 } }, [ undef, $old_row ]; | |||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | $old_row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | elsif ( /^### UPDATE (\S+)/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 4 | $row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 4 | ▶ | if ( ! @interesting_tables | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not @interesting_tables or exists $interesting_tables{$1}
MC/DC0%0/2
not @interesting_tables or exists $interesting_tables{$1}
not @interesting_tables
exists $interesting_tables{$1}
Truth table33%1/3
not(A) or B
A= not @interesting_tablesB= exists $interesting_tables{$1}
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | || exists $interesting_tables{ $1 } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 4 | $new_row = []; | |||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 4 | $old_row = []; | |||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 4 | push @{ $transaction{ $1 } }, [ $new_row, $old_row ]; | |||||||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | $new_row = $old_row = undef; | |||||||||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | ▶ | elsif ( $row && /@(\d+)=(.+)/ ) { | |||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$row and /@(\d+)=(.+)/
MC/DC0%0/2
$row and /@(\d+)=(.+)/
$row
/@(\d+)=(.+)/
Truth table33%1/3
A and B
A= $rowB= /@(\d+)=(.+)/
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 36 | $row->[ $1 - 1 ] = $2; | |||||||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | # did actually get EOT? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 7 | ▶ | $_ && substr( $_, 0, 6 ) eq 'COMMIT' | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$_ and substr($_, 0, 6) eq "COMMIT"
MC/DC0%0/2
$_ and substr($_, 0, 6) eq "COMMIT"
$_
substr($_, 0, 6) eq "COMMIT"
Truth table33%1/3
A and B
A= $_B= substr($_, 0, 6) eq "COMMIT"
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | or croak "truncated binlog file, at " . $handle->input_line_number() . ": $_"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | # last 'end_log_pos' seen | ||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 7 | $transaction{ end_position } = $end_pos; | |||||||||||||||||||||||||||||||||||||||||||||||
| 176 | # first 'at' seen | ||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 7 | $transaction{ start_position } = $pos; | |||||||||||||||||||||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 7 | return \%transaction; | |||||||||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | # actually got EOF? | ||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 2 | ▶ | $_ && substr( $_, 0, 9 ) eq 'DELIMITER' | ||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$_ and substr($_, 0, 9) eq "DELIMITER"
MC/DC0%0/2
$_ and substr($_, 0, 9) eq "DELIMITER"
$_
substr($_, 0, 9) eq "DELIMITER"
Truth table33%1/3
A and B
A= $_B= substr($_, 0, 9) eq "DELIMITER"
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | or croak "truncated binlog file, at " . $handle->input_line_number() . ": $_"; | ||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 2 | return; | |||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 2 | }; | |||||||||||||||||||||||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||