[MDEV-12713] Define virtual type_handler() for all Item classes Created: 2017-05-06  Updated: 2017-05-06  Resolved: 2017-05-06

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

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

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
blocks MDEV-12714 Determine Item::field_type() from Ite... Closed

 Description   

As of version 10.3.0, Item::type_handler is defined as:

virtual const Type_handler *type_handler() const
{
  return Type_handler::get_handler_by_field_type(field_type());
}

That is type handler is determined from field_type() by default.
This involves lookup inside get_handler_by_field_type(), which can affect performance negatively.
Also, this is not friendly for pluggable data types, which will define their own functions returning values of non-standard data types.

We'll change the definition of the method to:

virtual const Type_handler *type_handler() const= 0;

and implement it for all classes Item_xxx.


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