1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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
parent a765b19e5c
commit baadbe9601
3 changed files with 27 additions and 5 deletions

View File

@@ -1085,12 +1085,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;
}
}
/*