From 62e959437ee5bf64e89c7b16233ab2ca0fd8507c Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 3 Dec 2013 15:08:43 +0400 Subject: [PATCH] MDEV-5374 main.func_time fails with valgrind warning "Conditional jump or move depends on uninitialised" in Item_time_typecast::get_date. Adding "null_value" into the debug assert condition. --- sql/item_func.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/item_func.h b/sql/item_func.h index a176d5781ac..0838bbc2e99 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -159,7 +159,8 @@ public: inline bool get_arg0_time(MYSQL_TIME *ltime) { null_value= args[0]->get_time(ltime); - DBUG_ASSERT(ltime->time_type != MYSQL_TIMESTAMP_TIME || ltime->day == 0); + DBUG_ASSERT(null_value || + ltime->time_type != MYSQL_TIMESTAMP_TIME || ltime->day == 0); return null_value; } bool is_null() {