[MDEV-12303] Add Type_handler::Item_xxx_fix_length_and_dec() for CAST classes Created: 2017-03-20  Updated: 2017-04-07  Resolved: 2017-04-04

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 Description   

Pluggable data types should be able to:

  • define their own way to calculate data type attributes for explicit CAST
  • or reject explicit CAST operations to certain data type targets

Under terms of this task we'll introduce:

virtual bool Item_func_signed_fix_length_and_dec(Item_func_signed *item) const;
virtual bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *item) const;
virtual bool Item_double_typecast_fix_length_and_dec(Item_double_typecast *item) const;
virtual bool Item_decimal_typecast_fix_length_and_dec(Item_decimal_typecast *item) const;
virtual bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *item) const;
virtual bool Item_time_typecast_fix_length_and_dec(Item_time_typecast *item) const;
virtual bool Item_date_typecast_fix_length_and_dec(Item_date_typecast *item) const;
virtual bool Item_datetime_typecast_fix_length_and_dec(Item_datetime_typecast *item) const;

We'll also disallow explicit CAST from GEOMETRY to numeric and temporal data types,
as well as from GEOMETRY to CHAR.

Explicit CAST from GEOMETRY to BINARY will still be possible.



 Comments   
Comment by Alexander Barkov [ 2017-04-04 ]

Pushed to bb-10.2-ext and 10.3.

Generated at Thu Feb 08 07:56:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.