1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12826 Add Type_handler::val_int_signed_typecast() and Type_handler::val_int_unsigned_typecast()

This commit is contained in:
Alexander Barkov
2017-05-17 14:02:25 +04:00
parent fba7fbbc5c
commit 278c3ea756
5 changed files with 161 additions and 65 deletions

View File

@ -2976,6 +2976,70 @@ bool Type_handler_geometry::
#endif
/*************************************************************************/
longlong Type_handler_real_result::
Item_val_int_signed_typecast(Item *item) const
{
return item->val_int();
}
longlong Type_handler_int_result::
Item_val_int_signed_typecast(Item *item) const
{
return item->val_int();
}
longlong Type_handler_decimal_result::
Item_val_int_signed_typecast(Item *item) const
{
return item->val_int();
}
longlong Type_handler_temporal_result::
Item_val_int_signed_typecast(Item *item) const
{
return item->val_int();
}
longlong Type_handler_string_result::
Item_val_int_signed_typecast(Item *item) const
{
return item->val_int_signed_typecast_from_str();
}
/*************************************************************************/
longlong Type_handler_real_result::
Item_val_int_unsigned_typecast(Item *item) const
{
return item->val_int_unsigned_typecast_from_int();
}
longlong Type_handler_int_result::
Item_val_int_unsigned_typecast(Item *item) const
{
return item->val_int_unsigned_typecast_from_int();
}
longlong Type_handler_decimal_result::
Item_val_int_unsigned_typecast(Item *item) const
{
return item->val_int_unsigned_typecast_from_decimal();
}
longlong Type_handler_temporal_result::
Item_val_int_unsigned_typecast(Item *item) const
{
return item->val_int_unsigned_typecast_from_int();
}
longlong Type_handler_string_result::
Item_val_int_unsigned_typecast(Item *item) const
{
return item->val_int_unsigned_typecast_from_str();
}
/*************************************************************************/
String *