diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-11-12 14:58:59 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-11-12 14:58:59 +0400 |
commit | f6f23ce8d0c698d241b1ca88c5df0168d750399a (patch) | |
tree | 066085ffc202bb67e32e70ba2c05f4922d3e31ec /sql/item_timefunc.h | |
parent | 79f8a525a3c469e10dd06fd37a55734fa481377e (diff) | |
download | mariadb-git-f6f23ce8d0c698d241b1ca88c5df0168d750399a.tar.gz |
MONTHNAME() & DAYNAME() are now UCS2 compatible
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index de2860d24ef..c3dc9bfb6d4 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -85,7 +85,12 @@ public: const char *func_name() const { return "monthname"; } String *val_str(String *str); enum Item_result result_type () const { return STRING_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=10*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -192,7 +197,12 @@ class Item_func_dayname :public Item_func_weekday const char *func_name() const { return "dayname"; } String *val_str(String *str); enum Item_result result_type () const { return STRING_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=9; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=9*thd_charset()->mbmaxlen; + maybe_null=1; + } }; |