diff options
author | gluh@gluh.mysql.r18.ru <> | 2003-11-17 18:02:08 +0400 |
---|---|---|
committer | gluh@gluh.mysql.r18.ru <> | 2003-11-17 18:02:08 +0400 |
commit | 5ade64831eabf6c5e99df9890f7c8fded2b710d0 (patch) | |
tree | 1938e6b15b2f83f5ed4daaaf3037a102080b9eb6 /sql/item_timefunc.h | |
parent | a1199c7749954679b278591046b86ffeb65be0e1 (diff) | |
download | mariadb-git-5ade64831eabf6c5e99df9890f7c8fded2b710d0.tar.gz |
WL#1253: LAST_DAY
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 18 |
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)); + } +}; |