summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-05-06 13:34:16 +0400
committerAlexander Barkov <bar@mariadb.org>2017-05-06 13:34:16 +0400
commit380ec90905255e59a00773148e1763957a8deea6 (patch)
treeb296e192ec68c3432f9e1b464b05be0bf5cd3336 /sql/item_cmpfunc.cc
parent26fa7232cfc3f6df6984fed4253b03e53efbaf46 (diff)
downloadmariadb-git-380ec90905255e59a00773148e1763957a8deea6.tar.gz
MDEV-12710 Fix Item_cache constructors to accept Type_handler instead of enum_field_types
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 2 insertions, 2 deletions
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;