summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-03-12 20:13:05 +0100
committerSergei Golubchik <serg@mariadb.org>2018-03-14 12:40:00 +0100
commit24d6cd7d62c10a6a17be9f4fac1a112f16f8b6e8 (patch)
tree15bec26cde6f7c3f890150668614a57fba124002 /sql
parentc2671e97a3d6c68ee24090abca0ba5ff40d6d376 (diff)
downloadmariadb-git-24d6cd7d62c10a6a17be9f4fac1a112f16f8b6e8.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc7
-rw-r--r--sql/item_cmpfunc.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 7238caef6a0..75ed765ea7d 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -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.
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 7ce883e7214..f833232de95 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -113,8 +113,6 @@ public:
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"