1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11357 Split Item_cache::get_cache() into virtual methods in Type_handler

This patch:
- Adds a new virtual method Type_handler::Item_get_cache
- Splits moves Item_cache::get_cache() into the new method, every
  "case XXX_RESULT" to the corresponding Type_handler_xxx::Item_get_cache.
- Adds Item::get_cache as a convenience wrapper, to make the caller code
  shorter.
- Changes the last argument of Arg_comparator::cache_converted_constant()
  from Item_result to "const Type_handler *".
- Removes subselect_engine::cmp_type, subselect_engine::res_type,
  subselect_engine::res_field_type and derives subselect_engine
  from Type_handler_hybrid_field_type instead.
- Makes Type_handler_varchar public, as it's now needed as the
  default data type handler for subselect_engine.
This commit is contained in:
Alexander Barkov
2016-11-26 21:19:48 +04:00
parent 352ff9cc96
commit 749bbb3d7b
13 changed files with 100 additions and 84 deletions

View File

@ -3336,7 +3336,7 @@ int select_max_min_finder_subselect::send_data(List<Item> &items)
{
if (!cache)
{
cache= Item_cache::get_cache(thd, val_item);
cache= val_item->get_cache(thd);
switch (val_item->result_type()) {
case REAL_RESULT:
op= &select_max_min_finder_subselect::cmp_real;