1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Sergei Golubchik
2021-07-27 23:45:30 +02:00
committed by Nikita Malyavin
parent c86f813afe
commit 6152ab7b42
5 changed files with 68 additions and 5 deletions

View File

@ -5933,7 +5933,7 @@ void Type_handler_geometry::Item_param_set_param_func(Item_param *param,
/***************************************************************************/
bool Type_handler_string_result::union_element_finalize(const Item * item) const
bool Type_handler_string_result::union_element_finalize(Item_type_holder *item) const
{
if (item->collation.derivation == DERIVATION_NONE)
{
@ -5943,6 +5943,12 @@ bool Type_handler_string_result::union_element_finalize(const Item * item) const
return false;
}
bool Type_handler_null::union_element_finalize(Item_type_holder *item) const
{
item->set_handler(&type_handler_string);
return false;
}
/***************************************************************************/
bool Type_handler::Vers_history_point_resolve_unit(THD *thd,