summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-04-23 14:16:49 +0300
committergkodinov/kgeorge@magare.gmz <>2007-04-23 14:16:49 +0300
commit429371f9d5963d506efa078232e5b76da6108549 (patch)
treebf0ead26b838299751590c7caa8b4b169f004997 /sql/item_subselect.cc
parent0d70f964aa7cf64f6c6f0bdc14687f9076b6317e (diff)
downloadmariadb-git-429371f9d5963d506efa078232e5b76da6108549.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
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()