summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2019-04-25 20:11:37 +0900
committerGitHub <noreply@github.com>2019-04-25 20:11:37 +0900
commit80e8fee90732c4cf2436dde5d02f4edc7824f06b (patch)
tree7d9d5df2ca140335905c6e8e2e24fb28e90a7d63 /sql/sql_union.cc
parentebf3376677f9803a914cadc034c71ec2881f9eb4 (diff)
parentca7fbcea6c4fe13c295cf43b80d05351aba59e95 (diff)
downloadmariadb-git-bb-10.4-MDEV-18995.tar.gz
Merge branch '10.4' into bb-10.4-MDEV-18995bb-10.4-MDEV-18995
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 528292e5177..e10c0af2e16 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -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;
- }
}
/*