Commit 24d6cd7d authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: Arg_comparator::cache_converted_constant()

It's a generic function, not using anything from Arg_comparator.
Make it a static function, not a class method, to be able to use
it later without Arg_comparator
parent c2671e97
......@@ -34,6 +34,8 @@
#include "sql_time.h" // make_truncated_value_warning
#include "sql_base.h" // dynamic_column_error_message
static Item** cache_converted_constant(THD *thd, Item **value,
Item **cache_item, Item_result type,enum_field_types f_type);
/**
find an temporal type (item) that others will be converted to
......@@ -707,9 +709,8 @@ int Arg_comparator::set_cmp_func(Item_func_or_sum *owner_arg,
@return cache item or original value.
*/
Item** Arg_comparator::cache_converted_constant(THD *thd, Item **value,
Item **cache_item,
Item_result type)
static Item** cache_converted_constant(THD *thd, Item **value,
Item **cache_item, Item_result type)
{
/*
Don't need cache if doing context analysis only.
......
......@@ -113,8 +113,6 @@ class Arg_comparator: public Sql_alloc
int compare_e_json_str();
int compare_e_str_json();
Item** cache_converted_constant(THD *thd, Item **value, Item **cache,
Item_result type);
static arg_cmp_func comparator_matrix [6][2];
inline bool is_owner_equal_func()
{
......@@ -1069,7 +1067,7 @@ class Item_func_nullif :public Item_func_hybrid_field_type
The left "a" is in a comparison and can be replaced by:
- Item_func::convert_const_compared_to_int_field()
- agg_item_set_converter() in set_cmp_func()
- Arg_comparator::cache_converted_constant() in set_cmp_func()
- cache_converted_constant() in set_cmp_func()
Both "a"s are subject to equal fields propagation and can be replaced by:
- Item_field::propagate_equal_fields(ANY_SUBST) for the left "a"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment