summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-12-02 15:09:34 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-12-02 15:09:34 +0400
commitb97b9536c71b3ad5ef521a1f21c527057a0a01c6 (patch)
treee85de2a41e2c46f10c2fe064b400dc2f56b4749c /sql/item_func.h
parent928543ca6c3f37fb1f401d5fc41c71e597e76927 (diff)
downloadmariadb-git-b97b9536c71b3ad5ef521a1f21c527057a0a01c6.tar.gz
MDEV-4857 Wrong result of HOUR('1 00:00:00')
modified: mysql-test/r/func_time.result mysql-test/t/func_time.test sql-common/my_time.c sql/item_func.h sql/item_timefunc.cc sql/mysql_priv.h sql/time.cc
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index b3ce85b96c4..a176d5781ac 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -158,7 +158,9 @@ public:
}
inline bool get_arg0_time(MYSQL_TIME *ltime)
{
- return (null_value=args[0]->get_time(ltime));
+ null_value= args[0]->get_time(ltime);
+ DBUG_ASSERT(ltime->time_type != MYSQL_TIMESTAMP_TIME || ltime->day == 0);
+ return null_value;
}
bool is_null() {
update_null_value();