summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-02-13 20:37:31 +0400
committerAlexander Barkov <bar@mariadb.org>2018-02-13 20:37:31 +0400
commit95d075a0e5b9b4276c53f888c8090113a8adfbf4 (patch)
treeb43ac5e7c1db879aba5f29c97b70265ae083e124 /sql/item_windowfunc.cc
parent0c4aeef976d1094e90ce7a0b11138916e47c22fc (diff)
downloadmariadb-git-95d075a0e5b9b4276c53f888c8090113a8adfbf4.tar.gz
MDEV-15293 CAST(AS TIME) returns bad results for LAST_VALUE(),NAME_CONST(),SP variable
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index 45688b87730..6b703d5244f 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -344,6 +344,17 @@ Item_sum_hybrid_simple::val_str(String *str)
return retval;
}
+bool Item_sum_hybrid_simple::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (null_value)
+ return 0;
+ bool retval= value->get_date(ltime, fuzzydate);
+ if ((null_value= value->null_value))
+ DBUG_ASSERT(retval == true);
+ return retval;
+}
+
Field *Item_sum_hybrid_simple::create_tmp_field(bool group, TABLE *table)
{
DBUG_ASSERT(0);