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

MDEV-16872 Add CAST(expr AS FLOAT)

This commit is contained in:
Alexander Barkov
2019-05-16 10:16:09 +04:00
parent e0e805759f
commit b7d22a843e
12 changed files with 221 additions and 16 deletions

View File

@ -4642,6 +4642,14 @@ bool Type_handler::
}
bool Type_handler::
Item_float_typecast_fix_length_and_dec(Item_float_typecast *item) const
{
item->fix_length_and_dec_generic();
return false;
}
bool Type_handler::
Item_decimal_typecast_fix_length_and_dec(Item_decimal_typecast *item) const
{
@ -4731,6 +4739,13 @@ bool Type_handler_geometry::
}
bool Type_handler_geometry::
Item_float_typecast_fix_length_and_dec(Item_float_typecast *item) const
{
return Item_func_or_sum_illegal_param(item);
}
bool Type_handler_geometry::
Item_decimal_typecast_fix_length_and_dec(Item_decimal_typecast *item) const
{
@ -5760,6 +5775,15 @@ Item *Type_handler_double::
}
Item *Type_handler_float::
create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const
{
DBUG_ASSERT(!attr.length_specified());
return new (thd->mem_root) Item_float_typecast(thd, item);
}
Item *Type_handler_long_blob::
create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const