diff options
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index aff3485dbe4..c0f24d6940e 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -311,6 +311,11 @@ public: st_select_lex_unit* master_unit(); st_select_lex* outer_select(); st_select_lex* first_select() { return (st_select_lex*) slave; } + st_select_lex* first_select_in_union() + { + return (slave && slave->linkage == GLOBAL_OPTIONS_TYPE) ? + (st_select_lex*) slave->next : (st_select_lex*) slave; + } st_select_lex_unit* next_unit() { return (st_select_lex_unit*) next; } void exclude_level(); @@ -404,6 +409,13 @@ public: } friend void mysql_init_query(THD *thd); + void make_empty_select(st_select_lex *last_select) + { + select_number=INT_MAX; + init_query(); + init_select(); + include_neighbour(last_select); + } }; typedef class st_select_lex SELECT_LEX; |