Branch Coverage

blib/lib/SQL/Parser.pm
Criterion Covered Total %
branch 544 752 72.3


line true false branch
29 0 17 if ($ENV{'SQL_USER_DEFS'})
40 17 0 if uc $dialect eq 'ANSI'
41 0 17 if uc $dialect eq 'ANYDATA' or uc $dialect eq 'CSV'
42 0 17 if $dialect eq 'SQL::Eval'
46 6 11 unless defined $flags->{'PrintError'}
60 0 872 unless $self->{'dialect_set'}
78 36 836 if ($sql =~ /^\s*$comment_re(.*)$/s)
88 0 872 if ($sql =~ s/^([^']*?(?:'[^']*'[^'])*?)(--.*)(\n|$)/$1$3/)
96 38 834 unless ($com)
98 36 2 if $starts_with_comment
104 834 0 if ($self->{'opts'}{'valid_commands'}{$com}) { }
109 0 828 unless $self->{'struct'}{'command'}
114 620 208 if defined &_ARRAY0($self->{'struct'}{'table_names'})
117 693 13 -1 == index($_, '"') ? :
119 464 364 if (exists $self->{'struct'}{'join'} and not defined &_HASH($self->{'struct'}{'join'})) { }
127 0 364 if defined $self->{'struct'}{'join'}{'table_order'} and not defined &_ARRAY0($self->{'struct'}{'join'}{'table_order'})
130 58 306 if $self->{'struct'}{'join'}{'keycols'}
133 0 364 if $self->{'struct'}{'join'}{'shared_cols'}
136 792 36 if (defined $self->{'struct'}{'column_defs'} and defined &_ARRAY($self->{'struct'}{'column_defs'}))
142 605 408 if defined $_->{'fullorg'}
150 733 59 unless ($com eq 'CREATE')
158 465 0 unless $colname =~ /^(?:\p{Word}+\.)?"/
159 11 454 if defined $self->{'struct'}{'ORG_NAME'}{$colname}
173 0 0 if ($ENV{'SQL_USER_DEFS'})
191 800 977 unless $self->{'struct'}{'quoted_ids'} or $self->{'struct'}{'literals'}
192 1053 28 if ($id)
194 44 1009 if ($id =~ /^\?QI(\d+)\?$/) { }
0 1009 elsif ($id =~ /^\?(\d+)\?$/) { }
207 2 26 unless defined $self->{'struct'}{'table_names'}
211 6 22 if ($t =~ /^\?QI(.+)\?$/) { }
0 22 elsif ($t =~ /^\?(\d+)\?$/) { }
230 9 0 if (defined $opt_value) { }
232 0 9 if ($opt_class eq 'select') { }
0 9 elsif ($opt_class eq 'create') { }
261 0 0 unless $com =~ /COMMANDS|RESERVED|TYPES|OPS|OPTIONS|DIALECTS/i
262 0 0 if $com eq 'COMMANDS'
263 0 0 if $com eq 'OPS'
264 0 0 if $com eq 'TYPES'
265 0 0 if $com eq 'OPTIONS'
266 0 0 if $com eq 'RESERVED'
267 0 0 unless $self->{'dialect_set'}
269 0 0 unless $com eq 'DIALECTS'
276 0 0 if (opendir D, "$dir/$dDir")
289 0 18 unless $dialect
290 1 17 if $self->{'dialect_set'}
294 16 1 unless $mod_class->can('get_config')
298 0 17 unless $mod_class->can('get_config_as_hash')
319 0 34 unless eval { do { require "$mod" } }
328 0 0 unless eval "\n package $dest;\n use $role;\n 1;\n "
354 80 205 if /NOT/i
357 20 0 if scalar @notops
366 60 225 if /<=|>=|<>/
369 20 0 if scalar @compops
375 20 0 if scalar @allops
394 3 16 if ($stmt =~ /^\s*DROP\s+($features)\s+(.+)$/is)
402 9 7 if ($stmt =~ /^\s*DROP\s+TABLE\s+IF\s+EXISTS\s+(.*)$/is)
407 16 0 if ($stmt =~ /^\s*DROP\s+(\S+)\s+(.+)$/is) { }
411 0 16 unless ($com2 =~ /^TABLE$/i)
417 2 14 if ($table_name =~ /(\S+) (RESTRICT|CASCADE)/i)
428 0 16 unless $self->TABLE_NAME($table_name)
444 0 9 unless $table_name
445 0 9 unless $self->TABLE_NAME($table_name)
457 6 3 if ($where_clause)
460 0 6 unless $self->SEARCH_CONDITION($where_clause)
482 9 540 if ($str =~ s/^(.+) LIMIT (.+)$/$1/i)
483 20 529 if ($str =~ s/^(.+) ORDER BY (.+)$/$1/i)
484 8 541 if ($str =~ s/^(.+) GROUP BY (.+)$/$1/i)
485 219 330 if ($str =~ s/^(.+?) WHERE (.+)$/$1/i)
486 359 190 if ($str =~ s/^(.+?) FROM (.+)$/$1/i)
492 359 190 if $from_clause
494 7 540 unless $self->SELECT_CLAUSE($str)
496 219 321 if ($where_clause)
498 0 217 unless $self->SEARCH_CONDITION($where_clause)
500 7 531 if ($groupby_clause)
502 0 7 unless $self->GROUPBY_LIST($groupby_clause)
504 20 518 if ($order_clause)
506 0 20 unless $self->SORT_SPEC_LIST($order_clause)
508 9 529 if ($limit_clause)
510 0 9 unless $self->LIMIT_CLAUSE($limit_clause)
512 39 499 if ($self->{'struct'}{'join'}{'clause'} and $self->{'struct'}{'join'}{'clause'} eq 'ON' or $self->{'struct'}{'multiple_tables'} and not scalar keys %{$$self{'struct'}{'join'};})
518 0 39 unless $self->IMPLICIT_JOIN
521 0 7 if ($self->{'struct'}{'set_quantifier'} and 'DISTINCT' eq $self->{'struct'}{'set_quantifier'} and $self->{'struct'}{'has_set_functions'} and not defined &_ARRAY($self->{'struct'}{'group_by'}))
528 0 0 if $self->{'PrintError'}
537 0 7 unless $gclause
539 0 7 if $self->{'struct'}{'errstr'}
548 12 27 if (not $self->{'struct'}{'join'}{'clause'} or $self->{'struct'}{'join'}{'clause'} ne 'ON')
554 39 0 if (defined $self->{'struct'}{'keycols'}) { }
572 0 64 unless $remainder
574 64 0 if ($remainder =~ /^(.+?) (NATURAL|INNER|LEFT|RIGHT|FULL|CROSS|UNION|JOIN)(.+)$/is) { }
583 15 49 if ($remainder =~ /^NATURAL (.+)/)
589 43 21 if ($remainder =~ /^(INNER|LEFT|RIGHT|FULL|CROSS|UNION) JOIN (.+)/i)
593 34 9 unless $jtype =~ /INNER|UNION/i
595 0 64 if ($remainder =~ /^(LEFT|RIGHT|FULL|CROSS) OUTER JOIN (.+)/i)
600 21 43 if ($remainder =~ /^JOIN (.+)/i)
606 64 0 if ($self->{'struct'}{'join'})
608 20 44 if ($remainder and $remainder =~ /^(.+?) USING \(([^\)]+)\)(.*)/i)
616 27 37 if ($remainder and $remainder =~ /^(.+?) ON (.+)/i) { }
18 19 elsif ($remainder =~ /^(.+?)$/i) { }
625 0 27 unless $self->TABLE_NAME_LIST($tableA . ',' . $tableB)
637 9 39 if ($c1 eq $c2) { }
639 0 9 unless $arg1 = $self->ROW_VALUE($c1)
640 9 0 if ($arg1->{'type'} eq 'column' and not $is_done{$c1})
648 0 39 unless $arg1 = $self->ROW_VALUE($arg1)
649 0 39 unless $arg2 = $self->ROW_VALUE($arg2)
650 34 5 if ($arg1->{'type'} eq 'column' and $arg2->{'type'} eq 'column')
666 0 64 if $remainder
669 64 0 if ($jtype)
671 15 49 if $natural
672 0 64 if ($natural and $keycols)
676 2 62 unless $self->TABLE_NAME_LIST("$tableA,$tableB")
678 46 16 if $keycols
687 0 547 unless $str
688 8 539 if ($str =~ s/^(DISTINCT|ALL) (.+)$/$2/i)
692 7 540 unless $self->SELECT_LIST($str)
698 0 359 unless $str
699 64 295 if ($str =~ / JOIN /i) { }
701 2 62 unless $self->EXPLICIT_JOIN($str)
705 3 290 unless $self->TABLE_NAME_LIST($str)
715 7 167 if ($table_name and $table_name =~ /[()]/)
719 0 174 unless $table_name
720 0 174 unless defined $val_str
721 0 174 unless $self->TABLE_NAME($table_name)
724 7 167 if ($col_str) { }
726 0 7 unless $self->{'struct'}{'column_defs'} = $self->ROW_VALUE_LIST($col_str)
741 0 180 unless $self->LITERAL_LIST(substr($line_str, 1, -1))
742 174 6 unless $v =~ s/\A\s*,\s*//
759 0 12 unless $table_name and $remainder
760 0 12 unless $self->TABLE_NAME($table_name)
764 6 6 unless $set_clause
765 0 12 unless $self->SET_CLAUSE_LIST($set_clause)
767 6 6 if ($where_clause)
769 0 6 unless $self->SEARCH_CONDITION($where_clause)
776 4 18 if $v->{'type'} eq 'placeholder'
801 1138 1854 unless $sub =~ /^SQL_FUNCTION_([A-Z_0-9]+)$/
816 0 0 if ($stmt =~ /^(\S+)\s+LIKE\s*(.+)$/is) { }
820 0 0 if ($table_element_def =~ /^(.*)\s+KEEP CONNECTION\s*$/i)
830 0 0 unless $self->TABLE_NAME($table_name)
846 2 1 if ($stmt =~ /^(\S+)\s+NAME\s+(.*)$/ism)
853 0 3 if ($func =~ /^\?QI(\d+)\?$/)
857 2 1 if ($subname =~ /^\?QI(\d+)\?$/)
916 0 2 if ($stmt =~ /^(\S+)\s+NAME\s+(.*)$/ism)
923 0 2 if ($func =~ /^\?QI(\d+)\?$/)
927 0 2 if ($subname =~ /^\?QI(\d+)\?$/)
961 9 61 if ($stmt =~ /^\s*CREATE\s+($features)\s+(.+)$/is)
969 43 18 if ($stmt =~ /^\s*CREATE\s+(?:TEMP|TEMPORARY)\s+TABLE\s+(.+)$/is)
977 4 57 if ($stmt =~ /^(.*) ON COMMIT (DELETE|PRESERVE) ROWS\s*$/is)
988 61 0 if ($stmt =~ /^CREATE TABLE (\S+) \((.*)\)$/is) { }
0 0 elsif ($stmt =~ /^CREATE TABLE (\S+) AS (.*)$/is) { }
997 0 0 unless $self->TABLE_NAME($table_name)
1005 0 0 if (-1 != index($subquery, '?'))
1015 0 61 unless $self->TABLE_NAME($table_name)
1033 3 136 if ($col =~ /^\s*(?:CONSTRAINT\s+(\S+)\s*)? # optional name of foreign key FOREIGN\s+KEY\s*\(\s* # start of list of; vi compatibile bracket -> ( (\s*[^)]+\s*) # field names in this table \s*\)\s* # end of field names in this table REFERENCES # key word \s*(\S+)\s* # table name being referenced in foreign key \(\s* # start of list of; vi compatible bracket -> ( (\s*[^)]+\s*) # field names in foreign table \s*\)\s* # end of field names in foreign table $/x) { }
3 133 elsif ($col =~ /^\s*(?:CONSTRAINT\s+(\S+)\s*)? # optional name of foreign key PRIMARY\s+KEY\s*\(\s* # start of list of; vi compatibile bracket -> ( (\s*[^)]+\s*) # field names in this table \s*\)\s* # end of field names in this table $/x) { }
1051 2 1 if (defined $name) { }
1059 0 1 if ($name =~ s/(\W)$//)
1089 2 1 if (defined $name) { }
1096 0 1 if ($name =~ s/(\W)$//) { }
1120 0 133 unless $type
1121 0 133 unless $self->IDENTIFIER($name)
1130 389 10 if $count == 0
1132 0 10 if $count > 1
1135 0 10 if $constraint eq 'PRIMARY KEY' and $primary_defined++
1144 0 133 unless $suffix eq ''
1148 20 113 if ($type =~ /(.+)\((.+)\)/)
1153 2 131 unless ($self->{'opts'}{'valid_data_types'}{$type})
1169 125 6 unless $tmpname =~ /^(?:\p{Word}+\.)?"/
1170 0 131 if $is_col_name{$tmpname}++
1192 0 20 unless defined $col and defined $val
1197 0 12 unless $self->{'struct'}{'column_defs'} = $self->ROW_VALUE_LIST(join(',', @cols))
1198 0 12 unless $self->LITERAL_LIST(join(',', @vals))
1205 0 0 if ($str =~ /^(DISTINCT|ALL)\s+(.*)$/is)
1229 0 1 $colstr =~ s/^(.+)(\s+AS\s+\S+)$/$1/ ? :
1233 3 7 if ($1 eq '(') { }
3 4 elsif ($1 eq ')') { }
0 8 elsif (not $parens and substr($colstr, $-[1] + 1, 1) eq '|') { }
1257 1 0 unless scalar @concats
1286 242 469 if ($1 eq '(') { }
239 230 elsif ($1 eq ')') { }
137 93 elsif (not $parens) { }
1299 0 137 if $collist[-1] eq ''
1303 3 312 if $parens
1309 0 312 if $collist[-1] eq ''
1314 1 448 if $collist[$_] =~ /\|\|/
1323 232 315 if ($col_str =~ /^\s*\*\s*$/)
1336 3 312 unless scalar @col_list
1344 16 429 $col =~ /^(.+?)\s+(?:AS\s+)?([A-Z]\p{Word}*|\?QI\d+\?)$/i ? :
1349 2 443 if ($col =~ /^(\S+)\.\*$/) { }
1352 0 2 if (defined $alias)
1357 0 2 if $self->{'tmp'}{'is_table_alias'}{$table}
1359 0 2 if $self->{'tmp'}{'is_table_alias'}{lc $table}
1360 0 2 unless $self->TABLE_NAME($table)
1374 3 440 if $self->{'struct'}{'errstr'}
1376 1 439 if $self->{'struct'}{'errstr'}
1377 0 439 unless defined &_HASH($newcol)
1381 220 203 if (not defined $alias and 'function' eq $newcol->{'type'} || 'setfunc' eq $newcol->{'type'})
1387 236 203 if (defined $alias)
1407 34 409 if ($col_str =~ /^(COUNT|AVG|SUM|MAX|MIN) \((.*)\)\s*$/i) { }
1412 5 29 if ($set_function_arg_str =~ s/(DISTINCT|ALL) (.+)$/$2/i)
1419 8 26 if ($count_star) { }
1421 1 7 if 'DISTINCT' eq $distinct
1431 0 26 if $self->{'struct'}{'errstr'}
1432 0 26 unless defined &_HASH($set_function_arg)
1461 0 9 unless $limit_clause
1466 1 8 if ($limit_clause =~ /(\d+)\s+OFFSET\s+(\d+)/) { }
1472 0 9 if defined $limit and $limit =~ /[^\d]/ or defined $offset and $offset =~ /[^\d]/ or defined $junk
1476 2 7 if (defined $offset and not defined $limit)
1491 0 20 unless $order_clause
1498 9 17 if ($col =~ /\s*(\S+)\s+(ASC|DESC)/is) { }
17 0 elsif ($col =~ /^\s*(\S+)\s*$/is) { }
1512 0 26 unless $newcol = $self->COLUMN_NAME($newcol)
1513 3 23 if ($newcol =~ /^(.+)\..+$/s)
1530 0 231 unless $str
1547 0 231 if ($open_parens != $close_parens)
1552 135 96 $open_parens ? :
1556 0 229 unless $pred
1578 2 34 if '(' eq $1
1579 34 2 if ')' eq $1
1580 32 4 if $lparens == $rparens
1617 0 0 $lparens > $rparens ? :
0 135 unless $lparens == $rparens
1620 127 8 unless $lparens
1626 10 10 if $1 eq '('
1642 7 3 unless $pred =~ / (AND|OR) /i
1669 0 311 if $str =~ s/^NOT (\^.+)$/$1/i
1675 0 311 if $str =~ /^\s*~(\d+)~\s*$/
1678 2 309 if $str =~ /^\s*\^(\d+)\^\s*$/
1681 39 270 if ($str =~ /\G(.*?)\s+(AND|OR)\s+(.*)$/cgis)
1685 1 38 if ($pred1 =~ /^\s*\^(\d+)\^\s*$/) { }
1716 120 150 if ($str =~ /^\s*([A-Z]\p{Word}*)\s*\[/cgs) { }
1725 3 123 $1 eq '[' ? :
1733 66 54 if $str =~ /\G\s+\S+\s*(.+)\s*$/cgs
1741 270 0 if defined $k
1752 311 4 unless $str =~ / AND / and $str =~ / OR /
1755 0 4 unless $str =~ /^(.*?) AND (.*)$/i
1760 0 4 if $front =~ /^.* OR (.*)$/i
1763 4 0 if $back =~ /^(.*?) (OR|AND) .*$/i
1796 149 149 if ($1 eq ')') { }
15 134 elsif ($1 eq '(') { }
1803 134 15 if @lparens and $lparens[-1] == $parens
1854 7 226 if ($str =~ m<\(([\p{Word} \*/\+\-\[\]\?]+)\)>)
1857 5 2 if (not $match =~ /(LIKE |IS|BETWEEN|IN)/i) { }
1872 2 231 !$has_op && $str =~ m<\(([\p{Word} \*/\+\-\[\]\?]+)\)> ? :
1892 0 614 unless $val
1913 27 1872 if $str =~ /^NULL$/i
1914 13 1859 if $str =~ /^(?:TRUE|FALSE)$/i
1917 36 1823 if ($str eq '?')
1924 1 1822 if $str =~ /^'.*'$/s
1926 696 1126 if &looks_like_number($str)
1940 270 0 if $self->{'opts'}{'valid_comparison_NOT_ops_regex'}
1944 260 0 if not defined $op and $self->{'opts'}{'valid_comparison_twochar_ops_regex'}
1947 254 0 if not defined $op and $self->{'opts'}{'valid_comparison_ops_regex'}
1952 0 212 unless (defined $arg1 and defined $op and defined $arg2)
1976 15 254 if $arg1 =~ s/^NOT (.+)$/$1/i
1979 10 259 if $op =~ s/^(.+) NOT$/$1/i or $op =~ s/^NOT (.+)$/$1/i
1983 25 244 if %not and scalar keys %not == 1
1985 0 268 unless $arg1 = $self->ROW_VALUE($arg1)
1987 212 56 if ($op ne 'USER_DEFINED') { }
1989 0 212 unless $arg2 = $self->ROW_VALUE($arg2)
1997 27 76 if (defined &_HASH($arg1) and defined &_HASH($arg2) and ($arg1->{'type'} || '') eq 'column' and ($arg2->{'type'} || '') eq 'column' and $op eq '=')
2019 18 2522 unless $_[0]{'opts'}{'_udf_function_names'}
2034 139 139 if ($1 eq ']') { }
5 134 elsif ($1 eq '[') { }
2039 134 5 if @lbrackets and $lbrackets[-1] == $brackets
2089 149 52 unless ($parens or $delim ne ',')
2096 38 14 unless ($delim eq ',')
2098 19 19 $delim eq '(' ? :
2103 312 34 if ($spos != length $value)
2130 2303 6 if ($str =~ /^([^\s\(]+)\s*(.*)\s*$/) { }
2136 8 343 if ($is_func = $self->is_func($user_func_name) and not $user_func_args =~ /^\(.*\)$/ and $is_func =~ /^(?:$bf)$/i)
2154 5 346 if $is_func and not $is_func =~ /^(?:$bf)$/i and not $str =~ /^\S+\s*\(.*\)\s*$/
2156 346 1963 if ($is_func and not uc($is_func) =~ /^($f)$/)
2159 346 0 if ($str =~ /^(\S+)\s*\((.*)\)\s*$/)
2166 346 0 if ($is_func)
2182 346 0 if ($usr_sub)
2200 45 1918 if ($str =~ m[[\*\+\-/\%]])
2206 0 45 if ($open_parens != $close_parens)
2216 5 69 if ($self->is_func($term)) { }
2222 3 1 if '(' eq $1
2223 1 3 if ')' eq $1
2224 1 3 if $lparens == $rparens
2245 0 74 if ($newval and not $newval->{'type'} =~ /number|column|placeholder|function/)
2263 5 1913 if ($str =~ /^SUBSTRING \((.+?) FROM (.+)\)\s*$/i)
2269 4 1 if ($start =~ /^(.+?) FOR (.+)$/i)
2277 0 5 if ($start->{'type'} eq 'string' or $start->{'length'} and $start->{'length'}{'type'} eq 'string')
2282 0 5 unless $value
2284 0 5 if $value->{'type'} eq 'number'
2297 11 1902 if ($str =~ /^(TRIM) \((.+)\)\s*$/i)
2302 5 6 if ($value =~ /^(.+) FROM ([^\(\)]+)$/i)
2306 5 0 if ($front =~ /^\s*(TRAILING|LEADING|BOTH)(.*)$/i) { }
2312 3 2 if length $trim_char == 0
2325 0 11 unless $value
2327 11 0 if ref $value eq 'HASH'
2328 0 11 if defined &_ARRAY($value)
2329 0 11 if $value_type and $value_type eq 'number'
2343 2 1900 if ($str =~ /^(\S+) \(/)
2350 1 1899 if ($str =~ /\|\|/)
2357 0 3 unless $newval
2359 0 3 if $newval->{'type'} eq 'number'
2372 773 1126 if ($type = $self->LITERAL($str))
2374 27 746 if $type eq 'null'
2375 13 760 if $type eq 'boolean' and $str =~ /^TRUE$/i
2376 0 773 if $type eq 'boolean' and $str =~ /^FALSE$/i
2382 1 772 if $str and $str eq q['']
2392 429 697 if ($str =~ /\?(\d+)\?/) { }
30 667 elsif ($str =~ /^\?LI(\d+)\?$/) { }
2407 1 665 unless $str = $self->COLUMN_NAME($str)
2409 119 546 if ($str =~ /^(.*)\./)
2432 0 56 unless (scalar @row_list)
2443 0 129 unless $newval = $self->ROW_VALUE($row_val)
2457 122 571 if ($str =~ /^\s*(\S+)\.(\S+)$/s) { }
2460 0 122 unless ($self->{'opts'}{'valid_options'}{'SELECT_MULTIPLE_TABLES'})
2464 0 122 unless $table_name = $self->TABLE_NAME($table_name)
2478 693 0 unless ($col_name =~ /^(TRIM|SUBSTRING)$/i)
2480 690 3 unless $self->{'opts'}{'function_names'}{uc $user_func}
2482 690 3 unless ($user_func)
2484 1 688 unless $col_name eq '*' or $self->IDENTIFIER($col_name)
2491 10 681 if ($col_name =~ /^\?QI(\d+)\?$/) { }
2499 681 0 unless $self->{'struct'}{'command'} eq 'CREATE' or $col_name =~ /^(?:\p{Word}+\.)?"/
2511 0 691 if $self->{'struct'}{'column_aliases'}{$col_name}
2516 122 569 if ($table_name)
2519 17 105 if defined $alias
2520 120 2 unless $table_name =~ /^"/
2521 122 0 if -1 == index($col_name, '.')
2534 0 0 unless scalar @col_list
2543 0 0 unless $newcol = $self->COLUMN_NAME($col)
2560 0 386 if (scalar @table_names > 1 and not $self->{'opts'}{'valid_options'}{'SELECT_MULTIPLE_TABLES'})
2574 475 26 if (@tstr == 1) { }
11 15 elsif (@tstr == 2) { }
13 2 elsif (@tstr == 3) { }
2585 0 13 unless uc $tstr[1] eq 'AS'
2600 2 497 if ($u_name = $self->is_func($u_name) and $u_name =~ /^(?:$bf)$/i || $table =~ /^$u_name\s*\(/i) { }
2603 2 0 if $u_args
2611 3 492 unless $self->TABLE_NAME($table)
2615 7 487 $table =~ /^"/ ? :
2617 24 470 if ($alias)
2619 0 24 unless $self->TABLE_NAME($alias)
2621 0 24 if ($alias =~ /^"/) { }
2638 101 278 if @tables > 1
2646 680 2548 if $self->{'opts'}{'function_names'}{$name}
2647 32 2516 if $self->{'opts'}{'function_names'}{uc $name}
2657 0 917 if ($table_name =~ /^(.+?)\.([^\.]+)$/)
2662 0 917 if ($table_name =~ /\s*(\S+)\s+\S+/s)
2667 0 917 unless ($table_name)
2671 912 3 if $self->IDENTIFIER($table_name)
2680 122 122 if (defined $location) { }
2689 4 240 if ($table_name =~ /^"/) { }
2691 0 0 unless ($self->{'tmp'}{'is_table_name'}{$table_name} or $self->{'tmp'}{'is_table_alias'}{$table_name})
2701 0 240 unless ($table_name =~ /^(?:$tblnames)$/i)
2719 31 1709 if ($id =~ /^\?QI(.+)\?$/ or $id =~ /^\?(.+)\?$/)
2723 21 1688 if ($id =~ /^[`](.+)[`]$/)
2725 21 0 if $id = $1
2727 0 1688 if ($id =~ /^(.+)\.([^\.]+)$/)
2733 0 1688 if $id =~ /^".+?"$/s
2735 4 1684 if ($id =~ /\W/)
2741 0 1684 uc $self->{'dialect'} eq 'ANYDATA' ? :
2742 0 1684 if ($id =~ /$badStartRx/)
2747 0 1684 if (length $id > 128)
2753 3 1681 if ($self->{'opts'}{'reserved_words'}{$id})
2769 19 96 unless ($link =~ /\./)
2782 0 48 unless defined $t1 and defined $t2
2783 23 25 unless $is_table{$t1}++
2784 29 19 unless $is_table{$t2}++
2798 4 32 unless $is_ordered{$t2}
2803 0 32 unless ($is_ordered{$t})
2805 0 0 if $visited{$t}++ < @all_tables
2808 0 20 if @order < @all_tables
2819 0 17 if (defined $select)
2825 0 17 if (defined $create)
2855 0 872 if (scalar(@a) % 2 == 1)
2860 0 872 if ($sql =~ /\?\?(\d)\?/)
2883 28 844 if $qids
2895 0 872 if ($sql =~ /(.*)$comment_re$/s)
2900 2 870 if ($sql =~ /^(.*)--(.*)(\n|$)/)
2935 0 4 unless my $str = $_[0]
2948 0 19 if $self->{'PrintError'}
2949 6 13 if $self->{'RaiseError'}