From affca16bfc8b2b0862e9e8fbe9532196179301fe Mon Sep 17 00:00:00 2001 From: Xingyu Yang Date: Tue, 15 Jul 2025 14:11:06 +0800 Subject: [PATCH] bugfix --- sql/item.cc | 8 ++++++++ sql/item.h | 1 + 2 files changed, 9 insertions(+) diff --git a/sql/item.cc b/sql/item.cc index 9c19fcc344d..9b750d7a468 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -8892,6 +8892,14 @@ bool Item_view_ref::val_json(Json_wrapper *wr) { return super::val_json(wr); } +bool Item_view_ref::get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) { + if (has_null_row()) { + null_value = true; + return true; + } + return super::get_date(ltime, fuzzydate); +} + bool Item_view_ref::is_null() { if (has_null_row()) return true; diff --git a/sql/item.h b/sql/item.h index 2d276107258..7d6cb31fcdc 100644 --- a/sql/item.h +++ b/sql/item.h @@ -6243,6 +6243,7 @@ class Item_view_ref final : public Item_ref { String *val_str(String *str) override; bool val_bool() override; bool val_json(Json_wrapper *wr) override; + bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override; bool is_null() override; bool send(Protocol *prot, String *tmp) override; bool collect_item_field_or_view_ref_processor(uchar *arg) override; -- 2.43.5