Commit cdd9d656 authored by bar@mysql.com's avatar bar@mysql.com

sql_union.cc:

  Check DERIVATION_NONE only for UNIONS.
parent f8c7a60c
...@@ -264,9 +264,14 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, ...@@ -264,9 +264,14 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
} }
} }
if (first_select->next_select())
{ {
// it is not single select
/* /*
Check that it was possible to aggregate all collations together. Check that it was possible to aggregate
all collations together for UNION.
*/ */
List_iterator_fast<Item> tp(types); List_iterator_fast<Item> tp(types);
Item *type; Item *type;
...@@ -279,11 +284,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, ...@@ -279,11 +284,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
goto err; goto err;
} }
} }
}
// it is not single select
if (first_select->next_select())
{
union_result->tmp_table_param.field_count= types.elements; union_result->tmp_table_param.field_count= types.elements;
if (!(table= create_tmp_table(thd_arg, if (!(table= create_tmp_table(thd_arg,
&union_result->tmp_table_param, types, &union_result->tmp_table_param, types,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment