Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Item_cache and its descendants have this style constructors:
Item_cache(THD *thd, enum_field_types field_type_arg):
|
Item_basic_constant(thd),
|
Type_handler_hybrid_field_type(field_type_arg),
|
example(0), cached_field(0),
|
value_cached(0)
|
{
|
fixed= 1;
|
maybe_null= 1;
|
null_value= 1;
|
}
|
Making a cache involves calls for field_type(), e.g.:
new (thd->mem_root) Item_cache_int(thd, item->field_type()); |
new (thd->mem_root) Item_cache_temporal(thd, item->field_type()); |
This is not friendly to pluggable data types, which will return existing type codes in field_type().
We'll change all Item_cache* constructors to accept a Type_handler pointer instead:
Item_cache(THD *thd, const Type_handler *): |
Item_basic_constant(thd),
|
Type_handler_hybrid_field_type(handler),
|
example(0), cached_field(0),
|
value_cached(0)
|
{
|
...
|
}
|
And replace constructor calls to:
new (thd->mem_root) Item_cache_int(thd, item->type_handler()); |
new (thd->mem_root) Item_cache_temporal(thd, item->type_handler()); |
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed