From 380ec90905255e59a00773148e1763957a8deea6 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 6 May 2017 13:34:16 +0400 Subject: MDEV-12710 Fix Item_cache constructors to accept Type_handler instead of enum_field_types --- sql/item_cmpfunc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/item_cmpfunc.cc') diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index f7f3f991cde..d21f946ebbf 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -735,8 +735,8 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, { if (!thd) thd= current_thd; - - Item_cache_temporal *cache= new (thd->mem_root) Item_cache_temporal(thd, f_type); + const Type_handler *h= Type_handler::get_handler_by_field_type(f_type); + Item_cache_temporal *cache= new (thd->mem_root) Item_cache_temporal(thd, h); cache->store_packed(value, item); *cache_arg= cache; *item_arg= cache_arg; -- cgit v1.2.1