diff options
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 95979408ccb..6df90cebdff 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -133,13 +133,14 @@ public: class Item_str_conv :public Item_str_func { +protected: + uint multiply; + uint (*converter)(CHARSET_INFO *cs, char *src, uint srclen, + char *dst, uint dstlen); + String tmp_value; public: Item_str_conv(Item *item) :Item_str_func(item) {} - void fix_length_and_dec() - { - collation.set(args[0]->collation); - max_length = args[0]->max_length; - } + String *val_str(String *); }; @@ -147,16 +148,28 @@ class Item_func_lcase :public Item_str_conv { public: Item_func_lcase(Item *item) :Item_str_conv(item) {} - String *val_str(String *); const char *func_name() const { return "lcase"; } + void fix_length_and_dec() + { + collation.set(args[0]->collation); + multiply= collation.collation->casedn_multiply; + converter= collation.collation->cset->casedn; + max_length= args[0]->max_length * multiply; + } }; class Item_func_ucase :public Item_str_conv { public: Item_func_ucase(Item *item) :Item_str_conv(item) {} - String *val_str(String *); const char *func_name() const { return "ucase"; } + void fix_length_and_dec() + { + collation.set(args[0]->collation); + multiply= collation.collation->caseup_multiply; + converter= collation.collation->cset->caseup; + max_length= args[0]->max_length * multiply; + } }; |