summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-08-07 15:10:06 -0700
committerunknown <igor@rurik.mysql.com>2005-08-07 15:10:06 -0700
commit89e421cdb0aa59d4ff4b48c25fc5b2f226417455 (patch)
treeb282ec690ef863d7074f174379d21320da64bf2a /sql/item_subselect.cc
parent44b76f173d8a0fb5b80131e1a6b937e94568c61a (diff)
parent84d34d9d59d5d4c54787b0ceb40e087a130542a9 (diff)
downloadmariadb-git-89e421cdb0aa59d4ff4b48c25fc5b2f226417455.tar.gz
Manual merge
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ad1c9977e5b..53e377339b3 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1070,15 +1070,20 @@ Item_in_subselect::row_value_transformer(JOIN *join)
List_iterator_fast<Item> li(select_lex->item_list);
for (uint i= 0; i < n; i++)
{
+ Item *func;
DBUG_ASSERT(left_expr->fixed && select_lex->ref_pointer_array[i]->fixed);
if (select_lex->ref_pointer_array[i]->
check_cols(left_expr->el(i)->cols()))
DBUG_RETURN(RES_ERROR);
- Item *func= new Item_ref_null_helper(&select_lex->context,
- this,
- select_lex->ref_pointer_array+i,
- (char *) "<no matter>",
- (char *) "<list ref>");
+ if (join->having || select_lex->with_sum_func ||
+ select_lex->group_list.elements)
+ func= new Item_ref_null_helper(&select_lex->context,
+ this,
+ select_lex->ref_pointer_array+i,
+ (char *) "<no matter>",
+ (char *) "<list ref>");
+ else
+ func= li++;
func=
eq_creator.create(new Item_direct_ref(&select_lex->context,
(*optimizer->get_cache())->