mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #6139 UNION doesn't understand collate in the column of second select
This commit is contained in:
@ -264,6 +264,23 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
Check that it was possible to aggregate all collations together.
|
||||
*/
|
||||
List_iterator_fast<Item> tp(types);
|
||||
Item *type;
|
||||
while ((type= tp++))
|
||||
{
|
||||
if (type->result_type() == STRING_RESULT &&
|
||||
type->collation.derivation == DERIVATION_NONE)
|
||||
{
|
||||
my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), "UNION");
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// it is not single select
|
||||
if (first_select->next_select())
|
||||
{
|
||||
|
Reference in New Issue
Block a user