summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index c61ef4fb92b..6227d6d2cc5 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -180,6 +180,14 @@ class JOIN :public Sql_alloc
ROLLUP rollup; // Used with rollup
bool select_distinct; // Set if SELECT DISTINCT
+ /*
+ If we have the GROUP BY statement in the query,
+ but the group_list was emptied by optimizer, this
+ flag is TRUE.
+ It happens when fields in the GROUP BY are from
+ constant table
+ */
+ bool group_optimized_away;
/*
simple_xxxxx is set if ORDER/GROUP BY doesn't include any references
@@ -276,6 +284,7 @@ class JOIN :public Sql_alloc
ref_pointer_array_size= 0;
zero_result_cause= 0;
optimized= 0;
+ group_optimized_away= 0;
fields_list= fields_arg;
bzero((char*) &keyuse,sizeof(keyuse));