summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2003-11-17 18:02:08 +0400
committerunknown <gluh@gluh.mysql.r18.ru>2003-11-17 18:02:08 +0400
commitac584b24340a6abdce56a62e370feb1d51343488 (patch)
tree1938e6b15b2f83f5ed4daaaf3037a102080b9eb6 /sql/item_timefunc.h
parent9dbaca650210a6eaac3e89cc0e219a2398fb58f5 (diff)
downloadmariadb-git-ac584b24340a6abdce56a62e370feb1d51343488.tar.gz
WL#1253: LAST_DAY
mysql-test/r/func_time.result: Test for WL#1253: LAST_DAY mysql-test/t/func_time.test: Test for WL#1253: LAST_DAY
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index ef7fa1abfa0..a81b9f28d92 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -809,3 +809,21 @@ public:
max_length=MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
}
};
+
+class Item_func_last_day :public Item_str_func
+{
+public:
+ Item_func_last_day(Item *a) :Item_str_func(a) {}
+ String *val_str(String *str);
+ const char *func_name() const { return "last_day"; }
+ enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
+ void fix_length_and_dec()
+ {
+ decimals=0;
+ max_length=MAX_DATE_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
+ }
+ Field *tmp_table_field(TABLE *t_arg)
+ {
+ return (new Field_date(maybe_null, name, t_arg, &my_charset_bin));
+ }
+};