summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-12-24 18:10:18 +0400
committerAlexander Barkov <bar@mariadb.com>2019-12-24 18:10:18 +0400
commitb21dc119865993916abc736081e8ceed1e165961 (patch)
tree6d3a5fefe8dda07e31627cb3ab1f67d8313553fe /sql/item_timefunc.h
parent59a088744def823e5940757237b15fb00ae06f5f (diff)
downloadmariadb-git-b21dc119865993916abc736081e8ceed1e165961.tar.gz
MDEV-21389 Derive Item_func_month from Item_long_func
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 46f0da2ed2a..6373aa517ba 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -170,28 +170,13 @@ public:
};
-class Item_func_month :public Item_func
+class Item_func_month :public Item_long_func
{
public:
- Item_func_month(THD *thd, Item *a): Item_func(thd, a)
- { collation.set_numeric(); }
+ Item_func_month(THD *thd, Item *a): Item_long_func(thd, a)
+ { }
longlong val_int();
- double val_real()
- { DBUG_ASSERT(fixed == 1); return (double) Item_func_month::val_int(); }
- String *val_str(String *str)
- {
- longlong nr= val_int();
- if (null_value)
- return 0;
- str->set(nr, collation.collation);
- return str;
- }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- {
- return get_date_from_int(ltime, fuzzydate);
- }
const char *func_name() const { return "month"; }
- const Type_handler *type_handler() const { return &type_handler_long; }
bool fix_length_and_dec()
{
decimals= 0;