diff options
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 10247bd33a2..77c9b9c7f37 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -726,6 +726,21 @@ public: typedef class st_select_lex_unit SELECT_LEX_UNIT; typedef Bounds_checked_array<Item*> Ref_ptr_array; + +/* + Structure which consists of the field and the item which + produces this field. +*/ + +class Grouping_tmp_field :public Sql_alloc +{ +public: + Field *tmp_field; + Item *producing_item; + Grouping_tmp_field(Field *fld, Item *item) + :tmp_field(fld), producing_item(item) {} +}; + /* SELECT_LEX - store information of parsed SELECT statment */ @@ -910,6 +925,8 @@ public: /* namp of nesting SELECT visibility (for aggregate functions check) */ nesting_map name_visibility_map; + + List<Grouping_tmp_field> grouping_tmp_fields; void init_query(); void init_select(); @@ -1097,6 +1114,11 @@ public: return master_unit()->with_element; } With_element *find_table_def_in_with_clauses(TABLE_LIST *table); + void collect_grouping_fields(THD *thd); + void check_cond_extraction_for_grouping_fields(Item *cond, + Item_processor processor); + Item *build_cond_for_grouping_fields(THD *thd, Item *cond, + bool no_to_clones); List<Window_spec> window_specs; void prepare_add_window_spec(THD *thd); @@ -3193,6 +3215,7 @@ public: } }; + extern sql_digest_state * digest_add_token(sql_digest_state *state, uint token, LEX_YYSTYPE yylval); |