summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2011-02-02 10:18:44 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2011-02-02 10:18:44 +0100
commitb503d77d5c07166956374e230333b5095a44586a (patch)
treea1dc308f3397dddef7ec26d178c59ce95d0f4f0b /sql/item_sum.h
parented74edada2500531bfb661d3a024b3ac2bd883a8 (diff)
downloadmariadb-git-b503d77d5c07166956374e230333b5095a44586a.tar.gz
Backport of fix for Bug#52123
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 81e5e10fffa..4e2334b6c3b 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -461,10 +461,9 @@ public:
*/
virtual void no_rows_in_result()
{
- if (!aggr)
- set_aggregator(with_distinct ?
- Aggregator::DISTINCT_AGGREGATOR :
- Aggregator::SIMPLE_AGGREGATOR);
+ set_aggregator(with_distinct ?
+ Aggregator::DISTINCT_AGGREGATOR :
+ Aggregator::SIMPLE_AGGREGATOR);
aggregator_clear();
}
virtual void make_unique() { force_copy_fields= TRUE; }
@@ -515,11 +514,10 @@ public:
quick_group= with_distinct ? 0 : 1;
}
- /**
+ /*
Set the type of aggregation : DISTINCT or not.
- Called when the final determination is done about the aggregation
- type and the object is about to be used.
+ May be called multiple times.
*/
int set_aggregator(Aggregator::Aggregator_type aggregator);