diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_lex.h | 5 | ||||
-rw-r--r-- | sql/sql_union.cc | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 23d88b141b8..aa3e81fd9c9 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -332,7 +332,10 @@ public: Item_subselect *item; /* thread handler */ THD *thd; - /* fake SELECT_LEX for union processing */ + /* + SELECT_LEX for hidden SELECT in onion which process global + ORDER BY and LIMIT + */ st_select_lex *fake_select_lex; st_select_lex *union_distinct; /* pointer to the last UNION DISTINCT */ diff --git a/sql/sql_union.cc b/sql/sql_union.cc index fc569eac1fb..63638b618d9 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -263,7 +263,8 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, union_result->set_table(table); thd_arg->lex->current_select= lex_select_save; - if (!item_list.elements){ + if (!item_list.elements) + { Statement *stmt= thd->current_statement; Statement backup; if (stmt) |