summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-08-22 08:56:58 +0400
committerAlexander Barkov <bar@mariadb.com>2020-08-22 08:56:58 +0400
commit6708e67acc7ff1ee05845fb223abdb3bc8702d80 (patch)
treee0d7c94337e41276c43a84675ccdc046c9215562 /sql/item_func.h
parentee61c8c0b762840ab5badaa9d6b3a24b1c2ee8c7 (diff)
parentae33ebe5b32a82629a40e51c8d6c6611842fbd03 (diff)
downloadmariadb-git-6708e67acc7ff1ee05845fb223abdb3bc8702d80.tar.gz
Merge remote-tracking branch 'origin/10.4' into 10.5
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 5b4acdce1c6..6a4a9fa5dae 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -485,6 +485,12 @@ public:
virtual longlong val_int(Item_handled_func *) const= 0;
virtual my_decimal *val_decimal(Item_handled_func *, my_decimal *) const= 0;
virtual bool get_date(THD *thd, Item_handled_func *, MYSQL_TIME *, date_mode_t fuzzydate) const= 0;
+ virtual bool val_native(THD *thd, Item_handled_func *, Native *to) const
+ {
+ DBUG_ASSERT(0);
+ to->length(0);
+ return true;
+ }
virtual const Type_handler *
return_type_handler(const Item_handled_func *item) const= 0;
virtual const Type_handler *
@@ -631,6 +637,10 @@ public:
{
return Time(item).to_string(to, item->decimals);
}
+ bool val_native(THD *thd, Item_handled_func *item, Native *to) const
+ {
+ return Time(thd, item).to_native(to, item->decimals);
+ }
};
@@ -788,6 +798,10 @@ public:
{
return m_func_handler->get_date(thd, this, to, fuzzydate);
}
+ bool val_native(THD *thd, Native *to)
+ {
+ return m_func_handler->val_native(thd, this, to);
+ }
};