Fix for 996069: Incorrect RES.001 when using aggregate functions

This commit is contained in:
Brian Fraser
2012-11-02 01:18:10 -03:00
parent 4b5c8969f0
commit 1aa154d6c6
3 changed files with 7 additions and 0 deletions

View File

@@ -344,6 +344,7 @@ sub get_rules {
# Skip non-columns -- NULL, digits, functions, variables
my $cols = [
grep { _looks_like_column($_->{col}) }
grep { ! exists $_->{func} }
@{$event->{query_struct}->{columns}}
];
# All SELECT cols must be in GROUP BY cols clause.