summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-04-23 14:16:49 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-04-23 14:16:49 +0300
commitae5865ff430cc6939f5e94abc1645e27899ab823 (patch)
treebf0ead26b838299751590c7caa8b4b169f004997 /sql/item_subselect.cc
parent48039ab277838024be85836cc3378a903ad2794b (diff)
downloadmariadb-git-ae5865ff430cc6939f5e94abc1645e27899ab823.tar.gz
- addendum of the fix for bug 27786:
applied the new function is_union() to places in the code that check the same condition. - 5.0->5.1 merge fixes mysql-test/r/subselect3.result: merge 5.0->5.1 : updated explain. sql/item_subselect.cc: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places. sql/sql_derived.cc: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places. sql/sql_parse.cc: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places. sql/sql_select.cc: addendum of the fix for bug 27786: applied the new function is_union() to places in the code that check the same condition. sql/sql_union.cc: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places. sql/sql_view.cc: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places. sql/sql_yacc.yy: addendum of the fix for bug 27786: applied the new function is_union() to the applicable places.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 79b09967a9d..812d3c222c0 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -82,7 +82,7 @@ void Item_subselect::init(st_select_lex *select_lex,
parsing_place= (outer_select->in_sum_expr ?
NO_MATTER :
outer_select->parsing_place);
- if (select_lex->next_select())
+ if (unit->is_union())
engine= new subselect_union_engine(unit, result, this);
else
engine= new subselect_single_select_engine(select_lex, result, this);
@@ -412,7 +412,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
SELECT_LEX *select_lex= join->select_lex;
Query_arena *arena= thd->stmt_arena;
- if (!select_lex->master_unit()->first_select()->next_select() &&
+ if (!select_lex->master_unit()->is_union() &&
!select_lex->table_list.elements &&
select_lex->item_list.elements == 1 &&
!select_lex->item_list.head()->with_sum_func &&
@@ -1147,7 +1147,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
else
{
bool tmp;
- if (select_lex->master_unit()->first_select()->next_select())
+ if (select_lex->master_unit()->is_union())
{
/*
comparison functions can't be changed during fix_fields()