diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-07-27 23:45:30 +0200 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-07-29 02:08:23 +0300 |
commit | 6152ab7b42c18d62030ef9c23e9abb3817c73f39 (patch) | |
tree | 06cbca41de549b23519f1c8c7a86f1e55e99e6f9 /sql/sql_union.cc | |
parent | c86f813afe372a9dffc1badbc8f26e35e9d44b29 (diff) | |
download | mariadb-git-6152ab7b42c18d62030ef9c23e9abb3817c73f39.tar.gz |
MDEV-24511 null field is created with CREATE..SELECT
When creating fields for UNION results, Field_null is not allowed.
Should create binary(0) instead.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c89e59a06f8..48d8c16db68 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1154,7 +1154,8 @@ cont: 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)) + if (type->type() == Item::TYPE_HOLDER && type->type_handler()-> + union_element_finalize(static_cast<Item_type_holder*>(type))) goto err; } |