| line |
true |
false |
branch |
|
226
|
0 |
3 |
if (defined $self->{'argv'}{'configfile'}) |
|
228
|
0 |
0 |
unless (stat $self->{'argv'}{'configfile'}) |
|
234
|
0 |
0 |
unless (defined $fh) |
|
245
|
3 |
0 |
unless defined $self->{'argv'}{'interface'} |
|
246
|
3 |
0 |
unless defined $self->{'argv'}{'quote'} |
|
247
|
0 |
3 |
unless defined $self->{'argv'}{'connect'} |
|
248
|
1 |
2 |
unless defined $self->{'argv'}{'message_log'} |
|
249
|
3 |
0 |
unless defined $self->{'argv'}{'port'} |
|
252
|
0 |
3 |
unless (grep /^$self->{'argv'}{'interface'}$/i, "dbi") |
|
259
|
0 |
3 |
if (not defined $self->{'argv'}{'driver'} or $self->{'argv'}{'driver'} eq "") |
|
266
|
0 |
3 |
if (not defined $self->{'argv'}{'db'} or $self->{'argv'}{'db'} eq "") |
|
273
|
1 |
2 |
if (defined $self->{'argv'}{'tables'}) |
|
275
|
0 |
1 |
if (ref $self->{'argv'}{'tables'} ne "HASH") |
|
282
|
0 |
3 |
if (not defined $self->{'argv'}{'tables'}{$table}{'name'} or $self->{'argv'}{'tables'}{$table}{'name'} eq "") |
|
287
|
0 |
3 |
if (defined $self->{'init'}{'table_realname'}{$self->{'argv'}{'tables'}{$table}{'name'}}) |
|
292
|
0 |
3 |
if (defined $self->{'argv'}{'tables'}{$self->{'argv'}{'tables'}{$table}{'name'}}) |
|
298
|
2 |
1 |
if (defined $self->{'argv'}{'tables'}{$table}{'cols'}) |
|
300
|
0 |
2 |
if (ref $self->{'argv'}{'tables'}{$table}{'cols'} ne "HASH") |
|
308
|
0 |
6 |
if ($self->{'argv'}{'tables'}{$table}{'cols'}{$field} eq "") |
|
320
|
0 |
3 |
if (defined $self->{'argv'}{'message_syslog_facility'} and not $self->{'argv'}{'message_syslog_facility'} =~ /^local[0-7]$/i) |
|
325
|
0 |
3 |
if (defined $self->{'argv'}{'message_syslog_service'} and $self->{'argv'}{'message_syslog_service'} =~ s/[a-zA-Z0-9\-\_]//g) |
|
330
|
0 |
3 |
if (defined $self->{'argv'}{'sql_save_name'} and $self->{'argv'}{'sql_save_name'} =~ s/[a-zA-Z0-9\-\_]//g) |
|
338
|
3 |
0 |
unless defined $self->{'argv'}{'interface_options'}{'RaiseError'} |
|
339
|
3 |
0 |
unless defined $self->{'argv'}{'interface_options'}{'PrintError'} |
|
342
|
0 |
3 |
if (grep /^$self->{'argv'}{'driver'}$/i, 'mysql', 'mariadb') { } |
|
|
0 |
3 |
elsif (grep /^$self->{'argv'}{'driver'}$/i, 'pg', 'postgres', 'postsql', 'pgsql') { } |
|
|
3 |
0 |
elsif (grep /^$self->{'argv'}{'driver'}$/i, 'sqlite', 'sqlite3') { } |
|
353
|
3 |
3 |
if stat $fn |
|
356
|
0 |
3 |
if ($fn eq "") |
|
362
|
0 |
3 |
if ($@) |
|
368
|
0 |
3 |
unless (defined $self->{'init'}{'plugin_fh'}) |
|
375
|
0 |
3 |
if ($self->{'init'}{'test_server'}) |
|
377
|
0 |
0 |
if ($self->{'argv'}{'server'} eq "") |
|
382
|
0 |
0 |
if ($self->{'argv'}{'port'} ne "" and $self->{'argv'}{'port'} =~ /^\D+$/ || ($self->{'argv'}{'port'} < 1 || $self->{'argv'}{'port'} > 65535)) |
|
391
|
0 |
3 |
unless defined $bless |
|
394
|
0 |
3 |
if $self->{'argv'}{'connect'} and $self->Open |
|
412
|
0 |
2 |
if ($self->{'init'}{'plugin_fh'}->can("Open") and $self->{'init'}{'plugin_fh'}->Open) |
|
417
|
2 |
0 |
if ($self->{'argv'}{'interface'} =~ /^dbi$/i) |
|
459
|
0 |
17 |
unless defined $self->{'init'}{'dbh'} |
|
464
|
0 |
17 |
if ($self->{'init'}{'plugin_fh'}->can("SelectCursor") and $self->{'init'}{'plugin_fh'}->SelectCursor($argv)) |
|
470
|
0 |
17 |
if defined $argv->{'message_log'} |
|
471
|
0 |
17 |
if defined $argv->{'quote'} |
|
472
|
0 |
17 |
if defined $argv->{'sql_save'} |
|
476
|
0 |
17 |
if defined $argv->{'message_log'} |
|
477
|
0 |
17 |
if defined $argv->{'quote'} |
|
478
|
0 |
17 |
if defined $argv->{'sql_save'} |
|
489
|
0 |
17 |
if (not defined $argv->{'cursor_key'}) { } |
|
|
9 |
8 |
elsif (ref $argv->{'cursor_key'} eq '') { } |
|
|
8 |
0 |
elsif (ref $argv->{'cursor_key'} eq 'ARRAY') { } |
|
499
|
17 |
0 |
if (not defined $argv->{'cursor'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor'} eq '' and @{$self->{'work'}{'cursor_key'};} == 1) { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor'} eq 'ARRAY' and $self->{'work'}{'cursor_key'} == @{$argv->{'cursor'};} + 0) { } |
|
509
|
3 |
14 |
if not defined $argv->{'cursor_command'} or $argv->{'cursor_command'} eq "" |
|
511
|
9 |
8 |
if ($argv->{'cursor_command'} != 1 and $argv->{'cursor_command'} != 4) |
|
514
|
9 |
0 |
if (not defined $argv->{'cursor'} or $argv->{'cursor'} eq "") |
|
516
|
0 |
9 |
unless (defined $argv->{'cursor_info'}) |
|
524
|
9 |
0 |
if (ref $argv->{'cursor_info'} eq 'HASH') { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'SCALAR') { } |
|
535
|
0 |
0 |
if (@{$self->{'work'}{'cursor_key'};} > 1) |
|
549
|
4 |
5 |
if (ref $argv->{'cursor_key'} eq "ARRAY") |
|
551
|
0 |
4 |
if ref $first ne "ARRAY" |
|
552
|
0 |
4 |
if ref $last ne "ARRAY" |
|
556
|
3 |
6 |
if ($argv->{'cursor_command'} == 3) { } |
|
|
3 |
3 |
elsif ($argv->{'cursor_command'} == 2) { } |
|
|
3 |
0 |
elsif ($argv->{'cursor_command'} == 5) { } |
|
559
|
1 |
2 |
unless defined $last |
|
564
|
1 |
2 |
unless defined $first |
|
573
|
3 |
6 |
if ($argv->{'cursor_command'} == 5) |
|
576
|
3 |
0 |
if (ref $argv->{'cursor_info'} eq 'HASH') { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'ARRAY') { } |
|
578
|
0 |
3 |
if defined $argv->{'cursor_info'}{'previouscmd'} |
|
582
|
0 |
0 |
if @{$argv->{'cursor_info'};} >= 5 |
|
587
|
0 |
0 |
@{$self->{'work'}{'cursor_key'};} < 2 ? : |
|
588
|
0 |
0 |
if @a > 2 + $b |
|
594
|
0 |
17 |
if (defined $argv->{'where'} and ref $argv->{'where'} ne "ARRAY") |
|
602
|
17 |
0 |
if (not defined $argv->{'order_by'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'order_by'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $argv->{'order_by'} eq 'HASH') { } |
|
|
0 |
0 |
elsif (ref $argv->{'order_by'} eq '') { } |
|
613
|
7 |
10 |
if ($argv->{'cursor_command'} == 1) { } |
|
|
2 |
8 |
elsif ($argv->{'cursor_command'} == 2) { } |
|
|
5 |
3 |
elsif ($argv->{'cursor_command'} == 3 or $argv->{'cursor_command'} == 5) { } |
|
|
3 |
0 |
elsif ($argv->{'cursor_command'} == 4) { } |
|
616
|
3 |
4 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
624
|
0 |
2 |
$self->{'work'}{'cursor_command_reload'} ? : |
|
625
|
1 |
1 |
if (ref $argv->{'cursor_key'} ne 'ARRAY') { } |
|
643
|
1 |
1 |
if @w |
|
646
|
0 |
1 |
@{$argv->{'where'};} ? : |
|
652
|
3 |
2 |
$argv->{'cursor_command'} == 5 || $self->{'work'}{'cursor_command_reload'} ? : |
|
653
|
2 |
3 |
if (ref $argv->{'cursor_key'} ne 'ARRAY') { } |
|
671
|
3 |
3 |
if @w |
|
674
|
1 |
2 |
@{$argv->{'where'};} ? : |
|
681
|
1 |
2 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
695
|
17 |
0 |
if (not defined $argv->{'cursor_order'}) { } |
|
|
0 |
0 |
elsif ($argv->{'cursor_order'} eq 'ASC' or $argv->{'cursor_order'} eq 'DESC') { } |
|
707
|
0 |
17 |
if (not defined $argv->{'limit'} or $argv->{'limit'} eq "") |
|
714
|
17 |
0 |
unless defined $argv->{'notfound'} |
|
717
|
17 |
0 |
if $self->{'init'}{'cursor'}{'rc'} = $self->_Select(%{$argv;}) |
|
720
|
0 |
0 |
unless ($self->{'init'}{'cursor'}{'lines'}) |
|
727
|
0 |
0 |
if (not defined $argv->{'cursor_info'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'HASH') { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $argv->{'cursor_info'} eq 'SCALAR') { } |
|
733
|
0 |
0 |
if ($argv->{'cursor_command'} == 2 or $argv->{'cursor_command'} == 4) { } |
|
735
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
736
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
740
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
741
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
749
|
0 |
0 |
if ($argv->{'cursor_command'} == 2 or $argv->{'cursor_command'} == 4) { } |
|
751
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
752
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
756
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
757
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
764
|
0 |
0 |
if ($argv->{'cursor_command'} == 2 or $argv->{'cursor_command'} == 4) { } |
|
768
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
775
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
|
0 |
0 |
ref $argv->{'cursor_key'} eq 'ARRAY' ? : |
|
796
|
6 |
181 |
if $argv->{'subquery'} |
|
800
|
0 |
187 |
unless defined $self->{'init'}{'dbh'} |
|
805
|
0 |
187 |
if ($self->{'init'}{'plugin_fh'}->can("Select") and $self->{'init'}{'plugin_fh'}->Select($argv)) |
|
811
|
0 |
187 |
if defined $argv->{'message_log'} |
|
812
|
0 |
187 |
if defined $argv->{'quote'} |
|
813
|
1 |
186 |
if defined $argv->{'sql_save'} |
|
817
|
0 |
187 |
if defined $argv->{'message_log'} |
|
818
|
0 |
187 |
if defined $argv->{'quote'} |
|
819
|
1 |
186 |
if defined $argv->{'sql_save'} |
|
821
|
6 |
0 |
$self->getRC == 0 ? : |
|
|
6 |
181 |
if $argv->{'subquery'} |
|
830
|
0 |
204 |
if $self->_checkTablesEntries("select", $argv) != 0 |
|
833
|
204 |
0 |
if (not defined $argv->{'buffer'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer'} ne 'HASH') { } |
|
|
0 |
0 |
elsif (not defined $argv->{'buffer_hashkey'}) { } |
|
|
0 |
0 |
elsif (not defined $argv->{'buffer_hashindex'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer_hashindex'} ne 'ARRAY') { } |
|
848
|
192 |
12 |
if (defined $argv->{'fields'}) { } |
|
|
5 |
7 |
elsif (defined $self->{'argv'}{'tables'}) { } |
|
851
|
181 |
11 |
if (ref $argv->{'fields'} eq 'ARRAY') { } |
|
|
11 |
0 |
elsif (ref $argv->{'fields'} eq '') { } |
|
858
|
189 |
3 |
if (@{$fields_argv;} != 1 or $fields_argv->[0] ne "*") |
|
865
|
80 |
192 |
if (ref $field eq "HASH") |
|
872
|
51 |
29 |
if $fields_aliases{$alias}{'f'} =~ /^(.*?)\.(.*?)$/ |
|
874
|
3 |
269 |
if ($field =~ /^distinct$/i) { } |
|
|
0 |
269 |
elsif ($field =~ /^distinct\s+(.*)/i) { } |
|
884
|
269 |
3 |
unless ($field =~ /^\\/) |
|
886
|
18 |
250 |
$field =~ /^(.*?)\((.*)\)/ ? : |
|
|
1 |
268 |
$field =~ /^(.*?)\((.*?)\,(.*)\)/ ? : |
|
887
|
129 |
140 |
if ($value =~ /^(.*)\.(.*)$/) |
|
889
|
17 |
112 |
unless (grep /^$1$/, @{$$self{"work"}{"tables_valids"};}) |
|
897
|
3 |
252 |
if $distinct |
|
903
|
1 |
4 |
if (@{$self->{'work'}{'tables_inuse'};} > 1) { } |
|
909
|
2 |
0 |
if (not defined $self->{'argv'}{'tables'}{$table} && defined $self->{'argv'}{'tables'}{$table}{'cols'}) { } |
|
911
|
2 |
0 |
unless (defined $self->{'init'}{'table_realname'}{$table}) |
|
927
|
0 |
1 |
if ($any and @fields_work) |
|
935
|
2 |
2 |
!defined($self->{'init'}{'table_realname'}{$self->{'work'}{'tables_inuse'}[0]}) ? : |
|
936
|
2 |
2 |
if (defined $self->{'argv'}{'tables'}{$temp} and defined $self->{'argv'}{'tables'}{$temp}{'cols'}) |
|
944
|
15 |
172 |
if (defined $argv->{'group_by'}) |
|
946
|
0 |
15 |
if (ref $argv->{'group_by'} eq '') { } |
|
|
15 |
0 |
elsif (ref $argv->{'group_by'} eq 'ARRAY') { } |
|
957
|
42 |
145 |
if (defined $argv->{'order_by'}) |
|
959
|
2 |
40 |
if (ref $argv->{'order_by'} eq '') { } |
|
|
2 |
38 |
elsif (ref $argv->{'order_by'} eq 'HASH') { } |
|
|
38 |
0 |
elsif (ref $argv->{'order_by'} eq 'ARRAY') { } |
|
973
|
0 |
187 |
$self->{'init'}{'alias_with_as'} ? : |
|
976
|
174 |
13 |
if (@fields_work) { } |
|
981
|
3 |
258 |
$fields_distinct{$field} ? : |
|
983
|
72 |
189 |
if (defined $fields_aliases{$field}) |
|
989
|
3 |
258 |
if ($field =~ /^\\(.*)/) |
|
991
|
1 |
2 |
$alias ? : |
|
999
|
1 |
257 |
if ($field =~ /^(.*?)\((.*?)\,(.*)\)/) { } |
|
|
18 |
239 |
elsif ($field =~ /^(.*?)\((.*)\)/) { } |
|
1017
|
112 |
146 |
if ($field =~ /^(.*)\.(.*)$/) { } |
|
1020
|
102 |
10 |
!defined($self->{'init'}{'table_realname'}{$1}) ? : |
|
1022
|
88 |
24 |
if ($realn =~ /^.*\..*$/) { } |
|
1024
|
26 |
34 |
$table . '.' . $field ne $realn ? : |
|
|
28 |
60 |
if ($alias) { } |
|
1032
|
4 |
5 |
$field ne $realn ? : |
|
|
15 |
9 |
if ($alias) { } |
|
1041
|
120 |
26 |
if (@{$self->{'work'}{'tables_inuse'};} == 1) { } |
|
1044
|
51 |
51 |
$field ne $realn ? : |
|
|
18 |
102 |
if ($alias) { } |
|
1052
|
10 |
16 |
if ($alias) { } |
|
1061
|
0 |
32 |
if ($realn ne $field) |
|
1068
|
0 |
16 |
$alias ? : |
|
1083
|
0 |
187 |
if $self->_getWhere("select", $argv->{'where'}, \$where) |
|
1088
|
13 |
9 |
$group_work[$i] =~ /^(.*)\.(.*)$/ ? : |
|
1098
|
48 |
8 |
if (ref $field eq 'HASH') { } |
|
1117
|
66 |
121 |
if $where |
|
1118
|
15 |
172 |
if @group_work |
|
1119
|
42 |
145 |
if @order |
|
1120
|
16 |
171 |
if defined $argv->{'limit'} and $argv->{'limit'} > 0 |
|
1124
|
0 |
187 |
if (defined $argv->{'buffer_hashkey'}) |
|
1127
|
0 |
0 |
ref $argv->{'buffer_hashkey'} eq 'ARRAY' ? : |
|
1130
|
0 |
0 |
if defined $self->{'work'}{'cursor_key'} and grep /^$key$/, @{$$self{"work"}{"cursor_key"};} |
|
1152
|
187 |
0 |
if $self->_Call("command", $sql, "command_type", 0, "buffer", $argv->{'buffer'}, "buffer_options", $argv->{'buffer_options'}, "buffer_hashkey", $argv->{'buffer_hashkey'}, "buffer_arrayref", $argv->{'buffer_arrayref'}, "buffer_hashindex", $argv->{'buffer_hashindex'}, "buffer_hashindex", $argv->{'buffer_hashindex'}, "buffer_fields", @fields + 0, "cursor", $argv->{'cursor'}, "cursor_command", $argv->{'cursor_command'}, "cursor_key", $argv->{'cursor_key'}, "cursor_order", $argv->{'cursor_order'}, "make_only", $argv->{'make_only'}, "flush", $argv->{'flush'}, "sql_save", $argv->{'sql_save'}) |
|
1153
|
0 |
0 |
if $self->getRows |
|
1154
|
0 |
0 |
if $argv->{'notfound'} |
|
1168
|
41 |
15 |
if ($field =~ /^(.*?)\.(.*?)$/) { } |
|
1176
|
48 |
8 |
if ($order) |
|
1179
|
15 |
0 |
$order eq 'DESC' ? : |
|
|
33 |
15 |
$order eq 'ASC' ? : |
|
1199
|
2 |
13 |
unless defined $self->{'init'}{'dbh'} |
|
1204
|
0 |
15 |
if ($self->{'init'}{'plugin_fh'}->can("Delete") and $self->{'init'}{'plugin_fh'}->Delete($argv)) |
|
1210
|
0 |
15 |
if defined $argv->{'commit'} |
|
1211
|
0 |
15 |
if defined $argv->{'message_log'} |
|
1212
|
0 |
15 |
if defined $argv->{'quote'} |
|
1213
|
0 |
15 |
if defined $argv->{'sql_save'} |
|
1217
|
0 |
15 |
if defined $argv->{'commit'} |
|
1218
|
0 |
15 |
if defined $argv->{'message_log'} |
|
1219
|
0 |
15 |
if defined $argv->{'quote'} |
|
1220
|
0 |
15 |
if defined $argv->{'sql_save'} |
|
1230
|
0 |
15 |
if $self->_checkTablesEntries("delete", $argv) != 0 |
|
1234
|
0 |
15 |
if $self->_getWhere("delete", $argv->{'where'}, \$where) |
|
1235
|
0 |
15 |
if (!defined($where) || $where eq '' and not $argv->{'force'}) |
|
1243
|
10 |
5 |
if $where |
|
1255
|
15 |
0 |
if $self->_Call("command", $sql, "command_type", 1, "buffer", $argv->{'buffer'}, "buffer_options", $argv->{'buffer_options'}, "buffer_hashkey", $argv->{'buffer_hashkey'}, "buffer_arrayref", $argv->{'buffer_arrayref'}, "make_only", $argv->{'make_only'}, "flush", $argv->{'flush'}, "sql_save", $argv->{'sql_save'}) |
|
1256
|
0 |
0 |
if $argv->{'notfound'} |
|
1257
|
0 |
0 |
if ($self->getRows == 0) |
|
1280
|
0 |
22 |
unless defined $self->{'init'}{'dbh'} |
|
1285
|
0 |
22 |
if ($self->{'init'}{'plugin_fh'}->can("Insert") and $self->{'init'}{'plugin_fh'}->Insert($argv)) |
|
1291
|
0 |
22 |
if defined $argv->{'commit'} |
|
1292
|
0 |
22 |
if defined $argv->{'message_log'} |
|
1293
|
0 |
22 |
if defined $argv->{'quote'} |
|
1294
|
0 |
22 |
if defined $argv->{'sql_save'} |
|
1298
|
0 |
22 |
if defined $argv->{'commit'} |
|
1299
|
0 |
22 |
if defined $argv->{'message_log'} |
|
1300
|
0 |
22 |
if defined $argv->{'quote'} |
|
1301
|
0 |
22 |
if defined $argv->{'sql_save'} |
|
1311
|
0 |
22 |
if $self->_checkTablesEntries("insert", $argv) != 0 |
|
1314
|
0 |
22 |
unless (defined $argv->{'fields'}) |
|
1322
|
11 |
11 |
if (ref $argv->{'fields'} eq 'HASH') { } |
|
|
11 |
0 |
elsif (ref $argv->{'fields'} eq 'ARRAY') { } |
|
1325
|
0 |
11 |
unless (defined $argv->{'values'}) |
|
1330
|
0 |
11 |
if (ref $argv->{'values'} ne "ARRAY") |
|
1343
|
0 |
22 |
if (defined $argv->{'conflict'} and ref $argv->{'conflict'} ne "HASH") |
|
1354
|
11 |
11 |
if (ref $argv->{'fields'} eq 'HASH') { } |
|
1361
|
3 |
13 |
!defined($argv->{'fields'}{$field}) ? : |
|
1377
|
22 |
0 |
if (ref $value ne 'ARRAY') { } |
|
1379
|
6 |
16 |
!defined($value) ? : |
|
1387
|
0 |
0 |
!defined($value2) ? : |
|
1392
|
8 |
3 |
@fields == 1 ? : |
|
|
11 |
0 |
if @value_ |
|
1397
|
0 |
22 |
if (defined $argv->{'conflict'}) |
|
1404
|
0 |
0 |
$argv->{'conflict'}{$field} =~ /^\\(.*)/ ? : |
|
1408
|
0 |
0 |
$argv->{'conflict_key'} ? : |
|
|
0 |
0 |
$self->{'init'}{'plugin_id'} =~ /^mysql/i || $self->{'init'}{'plugin_id'} =~ /^mariadb/i ? : |
|
1422
|
22 |
0 |
if $self->_Call("command", $sql, "command_type", 1, "buffer", $argv->{'buffer'}, "buffer_options", $argv->{'buffer_options'}, "buffer_hashkey", $argv->{'buffer_hashkey'}, "buffer_arrayref", $argv->{'buffer_arrayref'}, "make_only", $argv->{'make_only'}, "flush", $argv->{'flush'}, "sql_save", $argv->{'sql_save'}) |
|
1441
|
0 |
40 |
unless defined $self->{'init'}{'dbh'} |
|
1446
|
0 |
40 |
if ($self->{'init'}{'plugin_fh'}->can("Update") and $self->{'init'}{'plugin_fh'}->Update($argv)) |
|
1452
|
0 |
40 |
if defined $argv->{'commit'} |
|
1453
|
0 |
40 |
if defined $argv->{'message_log'} |
|
1454
|
0 |
40 |
if defined $argv->{'quote'} |
|
1455
|
0 |
40 |
if defined $argv->{'sql_save'} |
|
1459
|
0 |
40 |
if defined $argv->{'commit'} |
|
1460
|
0 |
40 |
if defined $argv->{'message_log'} |
|
1461
|
0 |
40 |
if defined $argv->{'quote'} |
|
1462
|
0 |
40 |
if defined $argv->{'sql_save'} |
|
1472
|
0 |
40 |
if $self->_checkTablesEntries("update", $argv) != 0 |
|
1475
|
0 |
40 |
unless (defined $argv->{'fields'}) |
|
1480
|
0 |
40 |
if (ref $argv->{'fields'} ne "HASH") |
|
1492
|
22 |
32 |
if $realn =~ /^.*\..*$/ |
|
1494
|
2 |
52 |
if (not defined $argv->{'fields'}{$field}) { } |
|
|
1 |
51 |
elsif ($argv->{'fields'}{$field} =~ /^\\(.*)/) { } |
|
1518
|
19 |
32 |
if not $ident and $_table =~ /^(.*?)\s+.*?$/ |
|
1525
|
0 |
40 |
if $self->_getWhere("update", $argv->{'where'}, \$where) |
|
1526
|
0 |
40 |
if (!defined($where) || $where eq '' and not $argv->{'force'}) |
|
1534
|
15 |
25 |
if $where |
|
1547
|
40 |
0 |
if $self->_Call("command", $sql, "command_type", 1, "buffer", $argv->{'buffer'}, "buffer_options", $argv->{'buffer_options'}, "buffer_hashkey", $argv->{'buffer_hashkey'}, "buffer_arrayref", $argv->{'buffer_arrayref'}, "make_only", $argv->{'make_only'}, "flush", $argv->{'flush'}, "sql_save", $argv->{'sql_save'}) |
|
1548
|
0 |
0 |
if $argv->{'notfound'} |
|
1549
|
0 |
0 |
if ($self->getRows == 0) |
|
1571
|
0 |
0 |
unless defined $argv->{'count'} |
|
1572
|
0 |
0 |
unless defined $argv->{'interval'} |
|
1574
|
0 |
0 |
if $count =~ /^\D+$/ |
|
1575
|
0 |
0 |
if $sleep =~ /^\D+$/ |
|
1579
|
0 |
0 |
unless $self->Open |
|
1581
|
0 |
0 |
if $count and $sleep |
|
1609
|
0 |
0 |
unless defined $self->{'init'}{'dbh'} |
|
1613
|
0 |
0 |
if ($self->{'init'}{'plugin_fh'}->can("Call") and $self->{'init'}{'plugin_fh'}->Call($argv)) |
|
1618
|
0 |
0 |
if ($argv->{'command'} eq "") |
|
1624
|
0 |
0 |
if defined $argv->{'commit'} |
|
1625
|
0 |
0 |
if defined $argv->{'message_log'} |
|
1626
|
0 |
0 |
if defined $argv->{'quote'} |
|
1627
|
0 |
0 |
if defined $argv->{'sql_save'} |
|
1631
|
0 |
0 |
if defined $argv->{'commit'} |
|
1632
|
0 |
0 |
if defined $argv->{'message_log'} |
|
1633
|
0 |
0 |
if defined $argv->{'quote'} |
|
1634
|
0 |
0 |
if defined $argv->{'sql_save'} |
|
1647
|
1 |
0 |
if (defined $argv->{'sql_save'} and $argv->{'sql_save'} or defined $self->{'argv'}{'sql_save'} and $self->{'argv'}{'sql_save'} and $argv->{'command_type'}) |
|
1649
|
0 |
1 |
if $self->Save($argv->{'command'}) |
|
1653
|
264 |
0 |
if $argv->{'make_only'} |
|
1656
|
0 |
0 |
unless (defined $self->{'init'}{'dbh'}) |
|
1661
|
0 |
0 |
!defined($argv->{'flush'}) || $argv->{'flush'} ? : |
|
1665
|
0 |
0 |
if (not defined $argv->{'buffer'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer'} eq 'HASH') { } |
|
1668
|
0 |
0 |
if (not defined $argv->{'buffer_hashkey'}) { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer_hashkey'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer_hashkey'} eq 'SCALAR') { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer_hashkey'} eq '') { } |
|
1669
|
0 |
0 |
@{$argv->{'buffer_hashkey'};} > 1 ? : |
|
1677
|
0 |
0 |
if ($flush_buffer) |
|
1680
|
0 |
0 |
if defined $argv->{'buffer_hashindex'} |
|
1685
|
0 |
0 |
if (ref $argv->{'buffer'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer'} eq 'CODE') { } |
|
|
0 |
0 |
elsif (ref $argv->{'buffer'} eq 'SCALAR') { } |
|
1687
|
0 |
0 |
if (defined $argv->{'buffer_arrayref'} and not $argv->{'buffer_arrayref'}) { } |
|
1689
|
0 |
0 |
if ($argv->{'buffer_fields'} != 1) |
|
1697
|
0 |
0 |
if $flush_buffer |
|
1708
|
0 |
0 |
if (defined $argv->{'buffer_hashkey'}) |
|
1716
|
0 |
0 |
if ($self->{'init'}{'plugin_fh'}->can("PreFetch") and $self->{'init'}{'plugin_fh'}->PreFetch($argv)) |
|
1724
|
0 |
0 |
$argv->{'command'} =~ /\;$/ ? : |
|
1727
|
0 |
0 |
unless defined $self->{'work'}{'cursor_order'} |
|
1730
|
0 |
0 |
if (defined $sth) { } |
|
1736
|
0 |
0 |
if (defined $argv->{'buffer'}) |
|
1738
|
0 |
0 |
if ($sth->{'NUM_OF_FIELDS'}) |
|
1745
|
0 |
0 |
if (defined $self->{'work'}{'cursor_key'} and @{$self->{'work'}{'cursor_key'};}) |
|
1747
|
0 |
0 |
unless (@{$self->{'init'}{'cursor'}{'first'};}) |
|
1757
|
0 |
0 |
if ($type == 1) { } |
|
|
0 |
0 |
elsif ($type == 2) { } |
|
|
0 |
0 |
elsif ($type == 3) { } |
|
|
0 |
0 |
elsif ($type == 4) { } |
|
|
0 |
0 |
elsif ($type == 5) { } |
|
|
0 |
0 |
elsif ($type == 6) { } |
|
|
0 |
0 |
elsif ($type == 7) { } |
|
1758
|
0 |
0 |
$self->{'work'}{'cursor_order'} ? : |
|
1759
|
0 |
0 |
if &{$argv->{'buffer'};}($ref, $argv->{'buffer_options'}) |
|
1765
|
0 |
0 |
if $self->{'work'}{'cursor_key_vs_hashkey'} |
|
1768
|
0 |
0 |
$self->{'work'}{'cursor_order'} ? : |
|
|
0 |
0 |
if defined $argv->{'buffer_hashindex'} |
|
1774
|
0 |
0 |
if ($argv->{'buffer_fields'} == 2) { } |
|
1790
|
0 |
0 |
unless (defined $ref->{$key}) |
|
1797
|
0 |
0 |
if $self->{'work'}{'cursor_key_vs_hashkey'} |
|
1800
|
0 |
0 |
if defined $argv->{'buffer_hashindex'} |
|
1803
|
0 |
0 |
unless defined $$addr{$ref->{$key}} |
|
1810
|
0 |
0 |
$self->{'work'}{'cursor_order'} ? : |
|
|
0 |
0 |
if defined $argv->{'buffer_hashindex'} |
|
1813
|
0 |
0 |
keys %{$ref;} != 1 ? : |
|
1818
|
0 |
0 |
$self->{'work'}{'cursor_order'} ? : |
|
1824
|
0 |
0 |
if ($ref_saved and defined $self->{'work'}{'cursor_key'} and @{$self->{'work'}{'cursor_key'};}) |
|
1829
|
0 |
0 |
defined $ref_saved->{$key} ? : |
|
1846
|
0 |
0 |
if $self->{'argv'}{'commit'} and $argv->{'command_type'} |
|
1864
|
0 |
0 |
unless defined $self->{'init'}{'dbh'} |
|
1892
|
0 |
2 |
unless defined $self->{'init'}{'dbh'} |
|
1915
|
1 |
0 |
unless defined $self->{'init'}{'sql_save_ix'} |
|
1916
|
1 |
0 |
unless defined $self->{'init'}{'sql_save_name'} |
|
1920
|
0 |
0 |
$^O ne 'MSWin32' ? : |
|
|
1 |
0 |
defined $self->{'argv'}{'sql_save_dir'} ? : |
|
|
1 |
0 |
unless defined $self->{'init'}{'sql_save_dir'} |
|
1929
|
1 |
0 |
$self->{'argv'}{'sql_save_bydate'} ? : |
|
1931
|
1 |
0 |
unless (stat $path) |
|
1934
|
0 |
1 |
if ($@) |
|
1937
|
0 |
0 |
$self->{'argv'}{'sql_save_ignore'} ? : |
|
1943
|
0 |
1 |
unless (defined $fh) |
|
1946
|
0 |
0 |
$self->{'argv'}{'sql_save_ignore'} ? : |
|
1968
|
9 |
31 |
if (ref $argv->{'table'} eq 'ARRAY') { } |
|
|
31 |
0 |
elsif (ref $argv->{'table'} eq '') { } |
|
1986
|
151 |
131 |
unless $where |
|
1990
|
0 |
131 |
if $self->_getWhereRecursive($command, 0, $where, \@where_local) |
|
2006
|
0 |
155 |
if ($where eq "") |
|
2011
|
0 |
155 |
if (ref $where eq "") |
|
2017
|
0 |
155 |
if (ref $where ne "ARRAY") |
|
2027
|
1 |
219 |
if @where_tmp and join("", @where_tmp) eq "" |
|
2034
|
24 |
196 |
if (ref $value1 ne "") |
|
2037
|
0 |
24 |
if $self->_getWhereRecursive($command, $level + 1, $value1, \@where_aux) |
|
2040
|
5 |
19 |
if $oper_pend and @where_tmp |
|
2048
|
12 |
184 |
if ($value1 =~ /^(and|\&\&|or|\|\|)$/i) |
|
2050
|
10 |
2 |
if $oper_pend and @where_tmp |
|
2056
|
36 |
148 |
if ($oper_pend and @where_tmp) |
|
2063
|
184 |
0 |
if (not $value1 =~ /^\\(.*)/) { } |
|
2066
|
8 |
176 |
if ($self->_checkFunctions(\$value1, 16)) { } |
|
|
115 |
61 |
elsif (@{$self->{'work'}{'tables_inuse'};} == 1) { } |
|
|
46 |
15 |
elsif ($value1 =~ /^(.*?)\.(.*?)$/ and grep(/^$1$/, @{$$self{'work'}{'tables_inuse'};}) || defined $self->{'init'}{'table_realname'}{$1}) { } |
|
|
2 |
13 |
elsif (defined $self->{'work'}{'field_alias'}{$value1}) { } |
|
2094
|
1 |
183 |
if ($ix >= @{$where;}) |
|
2110
|
51 |
132 |
if (ref $value2 eq "ARRAY") |
|
2119
|
2 |
49 |
if (not defined $operator) { } |
|
|
1 |
48 |
elsif ($operator =~ /^\\/) { } |
|
|
4 |
44 |
elsif ($operator eq '=') { } |
|
|
16 |
28 |
elsif ($operator eq '!') { } |
|
|
0 |
28 |
elsif ($operator eq '!=') { } |
|
|
0 |
28 |
elsif ($operator eq '<>') { } |
|
|
0 |
28 |
elsif ($operator eq '<=') { } |
|
|
4 |
24 |
elsif ($operator eq '<') { } |
|
|
5 |
19 |
elsif ($operator eq '>=') { } |
|
|
4 |
15 |
elsif ($operator eq '>') { } |
|
|
1 |
14 |
elsif ($operator eq '%%') { } |
|
|
2 |
12 |
elsif ($operator eq '^%') { } |
|
|
2 |
10 |
elsif ($operator eq '%^') { } |
|
|
1 |
9 |
elsif ($operator eq '^^') { } |
|
|
0 |
9 |
elsif ($operator eq '!%%') { } |
|
|
2 |
7 |
elsif ($operator eq '!^%') { } |
|
|
2 |
5 |
elsif ($operator eq '!%^') { } |
|
|
0 |
5 |
elsif ($operator eq '!^^') { } |
|
2129
|
0 |
1 |
if @_value2 > 1 |
|
2130
|
1 |
1 |
if @_value2 > 1 |
|
2131
|
1 |
1 |
if @_value2 > 1 |
|
2132
|
0 |
1 |
if @_value2 > 1 |
|
2140
|
28 |
23 |
if ($operator eq "=" or $operator eq "!=") |
|
2142
|
8 |
20 |
if (@_value2 > 1) |
|
2146
|
0 |
21 |
if (not defined $_value2[$i]) { } |
|
|
2 |
19 |
elsif ($_value2[$i] =~ /^\\(.*)/) { } |
|
2153
|
2 |
0 |
if ($v =~ /^(\(SELECT\s+.*\))$/) { } |
|
|
0 |
0 |
elsif ($v =~ /^(.*?)\..*?$/ and grep /^$1$/, @{$$self{'work'}{'tables_valids'};}) { } |
|
|
0 |
0 |
elsif (defined $self->{'work'}{'field_alias'}{$v}) { } |
|
2176
|
2 |
6 |
$operator eq '!=' ? : |
|
2179
|
5 |
3 |
@_value2 == 3 && $_value2[1] eq q['..'] ? : |
|
2190
|
44 |
3 |
if (defined $value) { } |
|
|
0 |
3 |
elsif ($operator eq '=') { } |
|
2192
|
9 |
35 |
if ($value =~ /^\\(.*)/) { } |
|
2195
|
2 |
7 |
if ($v =~ /^(\(SELECT\s+.*\))$/) { } |
|
|
0 |
7 |
elsif ($v =~ /^(.*?)\..*?$/ and grep /^$1$/, @{$$self{'work'}{'tables_valids'};}) { } |
|
|
0 |
7 |
elsif (defined $self->{'work'}{'field_alias'}{$v}) { } |
|
2197
|
0 |
2 |
if ($operator eq '=') { } |
|
|
2 |
0 |
elsif ($operator eq '!=') { } |
|
2228
|
6 |
37 |
if (@where_aux > 1) |
|
2233
|
39 |
4 |
if @where_aux |
|
2238
|
3 |
129 |
unless (defined $value2) |
|
2243
|
129 |
0 |
if (ref $value2 eq "") |
|
2245
|
29 |
100 |
if ($value2 =~ /^\\(.*)/) { } |
|
2248
|
2 |
27 |
if ($v =~ /^(\(SELECT\s+(.*)\))$/) { } |
|
|
15 |
12 |
elsif ($v =~ /^(.*?)\..*?$/ and grep /^$1$/, @{$$self{'work'}{'tables_valids'};}) { } |
|
|
1 |
11 |
elsif (defined $self->{'work'}{'field_alias'}{$v}) { } |
|
2276
|
154 |
1 |
if (@where_tmp) |
|
2279
|
14 |
140 |
if ($level and @where_tmp > 1) |
|
2368
|
198 |
106 |
if defined $self->{'work'}{'tables_alias'}{$table} |
|
2381
|
304 |
0 |
unless $argv->{'schema'} |
|
2382
|
0 |
0 |
unless defined $self->{'argv'}{'schema'} |
|
2410
|
6 |
622 |
if defined $self->{'work'}{'field_alias'}{$field} |
|
2413
|
306 |
322 |
if ($field =~ /^(.*?)\.(.*?)$/) { } |
|
2417
|
78 |
228 |
if (defined $self->{'work'}{'field_cols'}) |
|
2419
|
66 |
12 |
if (defined $self->{'work'}{'field_cols'}{$_table}) { } |
|
2421
|
4 |
62 |
if (defined $self->{'work'}{'field_cols'}{$_table}{$_field}) |
|
2428
|
6 |
6 |
if (defined $self->{'work'}{'tables_alias'}{$_table}) |
|
2431
|
6 |
0 |
if (defined $self->{'work'}{'field_cols'}{$a}) |
|
2433
|
2 |
4 |
if (defined $self->{'work'}{'field_cols'}{$a}{$_field}) |
|
2442
|
104 |
202 |
unless (grep /^$_table$/, @{$$self{"work"}{"tables_inuse"};}) |
|
2444
|
10 |
94 |
unless defined $self->{'argv'}{'tables'} and defined $self->{'argv'}{'tables'}{$_table} |
|
2447
|
124 |
101 |
if defined $self->{'argv'}{'tables'} and defined $self->{'work'}{'tables_alias'}{$_table} and defined $self->{'argv'}{'tables'}{$self->{'work'}{'tables_alias'}{$_table}}{'cols'}{$_field} |
|
2448
|
212 |
84 |
if @{$self->{'work'}{'tables_inuse'};} != 1 |
|
2455
|
286 |
36 |
if (@{$self->{'work'}{'tables_inuse'};} == 1) { } |
|
2458
|
100 |
186 |
if defined $self->{'work'}{'tables_alias'}{$_table} and defined $self->{'argv'}{'tables'}{$self->{'work'}{'tables_alias'}{$_table}}{'cols'}{$_field} |
|
2467
|
16 |
56 |
if defined $self->{'work'}{'tables_alias'}{$t} and not defined $self->{'argv'}{'tables'}{$self->{'work'}{'tables_alias'}{$t}}{'cols'}{$_field} |
|
2470
|
28 |
28 |
if $_table |
|
2477
|
232 |
358 |
if ($_table and $result & 32768) |
|
2479
|
118 |
114 |
if defined $self->{'work'}{'tables_alias'}{$_table} |
|
2503
|
2 |
8 |
defined $3 ? : |
|
2504
|
2 |
8 |
defined $3 ? : |
|
2508
|
8 |
227 |
if ($lvl) |
|
2510
|
2 |
6 |
if ($op1 =~ /^(.*?)\,(.*)$/) { } |
|
2514
|
0 |
2 |
if ($o1 =~ /^.*?\..*?$/) { } |
|
2526
|
2 |
4 |
if ($op1 =~ /^.*?\..*?$/) { } |
|
2550
|
0 |
281 |
unless (defined $argv->{'table'}) |
|
2558
|
195 |
86 |
if (ref $argv->{'table'} eq '') { } |
|
|
86 |
0 |
elsif (ref $argv->{'table'} eq 'ARRAY' and $self->{'work'}{'command'} == 8 || $self->{'work'}{'command'} == 2) { } |
|
2576
|
0 |
367 |
if (grep /^$table$/, @{$$self{"work"}{"tables_inuse"};}) |
|
2581
|
305 |
62 |
if (defined $self->{'argv'}{'tables'}) |
|
2584
|
158 |
147 |
if (defined $self->{'argv'}{'tables'}{$table} and defined $self->{'argv'}{'tables'}{$table}{'name'}) { } |
|
|
68 |
79 |
elsif (defined $self->{'init'}{'table_realname'}{$table}) { } |
|
2587
|
0 |
158 |
if (defined $self->{'work'}{'tables_alias'}{$realname}) |
|
2663
|
0 |
0 |
if $quote eq "" or $quote eq "\"" or $quote eq "'" |
|
2677
|
0 |
234 |
if $self->{'argv'}{'quote'} eq "" |
|
2710
|
4 |
17 |
unless (defined $rc) |
|
2712
|
0 |
4 |
if defined $self->{'init'}{'dbh'} and $self->{'init'}{'dbh'}->err |
|
2713
|
0 |
4 |
if $DBI::err |
|
2722
|
17 |
0 |
defined $SQL_SIMPLE_TABLE_OF_MSGS{$code} ? : |
|
2725
|
0 |
17 |
if ($self->{'argv'}{'message_log'}) |
|
2727
|
0 |
0 |
if $self->{'argv'}{'message_log'} & 2 |
|
2729
|
0 |
0 |
if ($self->{'argv'}{'message_log'} & 1) |
|
2736
|
0 |
0 |
$SQL_SIMPLE_TABLE_OF_MSGS{$code}{'T'} eq 'W' ? : |
|
|
0 |
0 |
$SQL_SIMPLE_TABLE_OF_MSGS{$code}{'T'} eq 'S' ? : |
|
|
0 |
0 |
$SQL_SIMPLE_TABLE_OF_MSGS{$code}{'T'} eq 'E' ? : |
|
2762
|
282 |
0 |
unless $self->{'init'}{'dumper'} |