summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-06-20 19:36:37 +0400
committerAlexander Barkov <bar@mariadb.com>2018-06-20 19:36:37 +0400
commitff09512e07045b0997265d37c45f075daebe9531 (patch)
tree8ffec2c5e99266e730a9388c3d1936602b1e815c /sql/item_windowfunc.cc
parent9c53cbdd8887f0f8bcdade24a4be183a3b354bc9 (diff)
downloadmariadb-git-ff09512e07045b0997265d37c45f075daebe9531.tar.gz
MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]'
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index b523235b3ad..3ad0527384d 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -444,7 +444,7 @@ bool Item_sum_hybrid_simple::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
{
DBUG_ASSERT(fixed == 1);
if (null_value)
- return 0;
+ return true;
bool retval= value->get_date(ltime, fuzzydate);
if ((null_value= value->null_value))
DBUG_ASSERT(retval == true);