Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Item_func_hex::val_str_ascii() has a few tests on args[0]->result_type().
if (args[0]->result_type() == REAL_RESULT || |
args[0]->result_type() == DECIMAL_RESULT)
|
We'll move the data type specific code to the corresponding Type_handler_xxx, and rewrite Item_func_hex::val_str_ascii() to call a virtual method in Type_handler, e.g. about like this:
String *val_str_ascii(String *str)
|
{
|
return args[0]->type_handler()->Item_func_hex_val_str_ascii(this, str); |
}
|
Note, the value of args[0]->type_handler() can be cached at fix_length_and_dec() time, to have fewer virtual calls at run time:
String *val_str_ascii(String *str)
|
{
|
return m_handler->Item_func_hex_val_str_ascii(this, str); |
}
|
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed