Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
resolve_const_item() is not friendly to pluggable data types, as it has:
- A switch on the result of item_cmp_type()
- A call for field_type_for_temporal_comparison()
This is hard-coded for built-in data types only and won't work properly for new data types.
We'll do the following:
- Introduce a new method in Type_handler:
virtual Item *make_const_item_for_comparison(THD *thd,
Item *src,
Item *comparand) const= 0;
- Split the code in resolve_const_item() into virtual implementations of the proper type handler implementations
- Replace item_cmp_type() to Type_handler_hybrid_field_type::aggregate_for_comparison()
- Remove Item::field_type_for_temporal_comparison(), as it won't be used any more in the server code.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed