From 2feac61e18c66876cab654285e02c7020050c556 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 1 Nov 2018 16:57:58 +0400 Subject: [PATCH] A cleanup for: MDEV-16884 Remove tests for field_type() in Item_cache_temporal It seems Item_cache_time::val_datetime_packed() is never caller in the current code. Fixing it to use to_packed() rather than to_longlong() anyway. --- sql/item.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item.h b/sql/item.h index 9da64c60b25..94fe16bef3e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -6419,7 +6419,7 @@ public: longlong val_datetime_packed(THD *thd) { date_mode_t fuzzy= Datetime::comparison_flags_for_get_date(); - return has_value() ? Datetime(thd, this, fuzzy).to_longlong() : 0; + return has_value() ? Datetime(thd, this, fuzzy).to_packed() : 0; } longlong val_time_packed(THD *thd) {