summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-03-28 11:26:02 +0400
committerAlexander Barkov <bar@mariadb.com>2018-03-28 11:26:02 +0400
commitc34602995894c9a04f4312484cfe6e45c43426e6 (patch)
tree16d5e90168fdbede15163b60610616c2e036bcd1 /sql/item_timefunc.h
parent068450a3828a7ed678081fb57f63950d0828c430 (diff)
downloadmariadb-git-c34602995894c9a04f4312484cfe6e45c43426e6.tar.gz
MDEV-15702 Remove the use of STRING_ITEM from Item_func_date_format::fix_length_and_dec()
Implementing the task according to the description. Additionally, implementing Item_func_date_format::check_arguments().
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index c3bda9d85ba..30d5018ff36 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -847,6 +847,11 @@ public:
class Item_func_date_format :public Item_str_func
{
+ bool check_arguments() const
+ {
+ return args[0]->check_type_can_return_date(func_name()) ||
+ check_argument_types_can_return_text(1, arg_count);
+ }
const MY_LOCALE *locale;
int fixed_length;
String value;