mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Removed a useless part of the regex that looked for something function-like, and made the NULL check case-insensitive
This commit is contained in:
@@ -4056,8 +4056,8 @@ sub determine_table_for_column {
|
||||
|
||||
sub _looks_like_column {
|
||||
my $col = shift;
|
||||
return if $col eq '*' || $col eq 'NULL';
|
||||
return if $col =~ /\A(?:\b[0-9]+\b|[^(]+\(|\@{1,2}.+)/;
|
||||
return if $col eq '*' || uc($col) eq 'NULL';
|
||||
return if $col =~ /\A(?:\b[0-9]+\b|\@{1,2}.+)/;
|
||||
return $col;
|
||||
}
|
||||
|
||||
|
@@ -667,8 +667,8 @@ sub determine_table_for_column {
|
||||
sub _looks_like_column {
|
||||
my $col = shift;
|
||||
# NULL, numbers, variables and functions are definitely not columns
|
||||
return if $col eq '*' || $col eq 'NULL';
|
||||
return if $col =~ /\A(?:\b[0-9]+\b|[^(]+\(|\@{1,2}.+)/;
|
||||
return if $col eq '*' || uc($col) eq 'NULL';
|
||||
return if $col =~ /\A(?:\b[0-9]+\b|\@{1,2}.+)/;
|
||||
return $col;
|
||||
}
|
||||
|
||||
|
@@ -468,7 +468,7 @@ my @cases = (
|
||||
},
|
||||
{
|
||||
name => 'Bug 937234: wrong RES.001',
|
||||
query => q{select NULL, 1, COUNT(*), @@time_zone, foo as field2 from t1 group by field2},
|
||||
query => q{select NULL, null, 1, COUNT(*), @@time_zone, foo as field2 from t1 group by field2},
|
||||
advice => [qw(CLA.001)],
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user