1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-9234 Add Type_handler::union_element_finalize()

This commit is contained in:
Alexander Barkov
2019-04-23 13:45:28 +04:00
committed by Nikita Malyavin
parent 9d5967f74b
commit c86f813afe
3 changed files with 26 additions and 6 deletions

View File

@ -1150,12 +1150,12 @@ cont:
while ((type= tp++))
{
if (type->cmp_type() == STRING_RESULT &&
type->collation.derivation == DERIVATION_NONE)
{
my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), "UNION");
/*
Test if the aggregated data type is OK for a UNION element.
E.g. in case of string data, DERIVATION_NONE is not allowed.
*/
if (type->type_handler()->union_element_finalize(type))
goto err;
}
}
/*