26class Item_func_conv_charset :
public Item_str_func
28 bool use_cached_value;
33 { conv_charset= cs; use_cached_value= 0; safe= 0; }
37 assert(args[0]->
fixed);
41 String tmp, *str= args[0]->val_str(&tmp);
45 str_value.copy(str->ptr(), str->length(), conv_charset);
52 use_cached_value=
false;
58 safe= (args[0]->collation.collation == &my_charset_bin ||
59 cs == &my_charset_bin ||
60 (cs->state & MY_CS_UNICODE));
64 void fix_length_and_dec();
65 const char *func_name()
const {
return "convert"; }