[MDEV-11298] Split Item_func_hex::val_str_ascii() into virtual methods in Type_handler Created: 2016-11-16 Updated: 2017-04-07 Resolved: 2016-12-01 |
|
| 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: |
|
||||||||
| Description |
|
Item_func_hex::val_str_ascii() has a few tests on args[0]->result_type().
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:
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:
|