diff options
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 850586c6098..1175776ffd3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -541,6 +541,7 @@ public: bool change_result(select_subselect *result, select_subselect *old_result); void set_limit(st_select_lex *values); void set_thd(THD *thd_arg) { thd= thd_arg; } + inline bool is_union (); friend void lex_start(THD *thd, const char *buf, uint length); friend int subselect_union_engine::exec(); @@ -795,6 +796,13 @@ private: }; typedef class st_select_lex SELECT_LEX; + +inline bool st_select_lex_unit::is_union () +{ + return first_select()->next_select() && + first_select()->next_select()->linkage == UNION_TYPE; +} + #define ALTER_ADD_COLUMN (1L << 0) #define ALTER_DROP_COLUMN (1L << 1) #define ALTER_CHANGE_COLUMN (1L << 2) |