summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-12-25 13:33:28 +0400
committerAlexander Barkov <bar@mariadb.com>2019-12-25 13:33:28 +0400
commit4c57ab34d4852387da4ef8eac862045d1458de1e (patch)
tree743ed619818e8862b9707f7c8f12691eeda76db5 /sql/item_timefunc.h
parent3fbd9f1522cf52247b9659cd50efe367767abf0e (diff)
parentee9a19fb054085fcea006a25ec957e0d5cb01ce8 (diff)
downloadmariadb-git-4c57ab34d4852387da4ef8eac862045d1458de1e.tar.gz
Merge remote-tracking branch 'origin/10.3' into 10.4
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 2e9454804ae..fe9dc8b43e2 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -166,28 +166,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(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
- {
- return get_date_from_int(thd, 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;