Commit 9755e44f authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

item_strfunc.cc:

  The result didn't return proper collation
parent d37ebc34
...@@ -1663,13 +1663,16 @@ longlong Item_func_elt::val_int() ...@@ -1663,13 +1663,16 @@ longlong Item_func_elt::val_int()
String *Item_func_elt::val_str(String *str) String *Item_func_elt::val_str(String *str)
{ {
uint tmp; uint tmp;
String *res;
if ((tmp=(uint) item->val_int()) == 0 || tmp > arg_count) if ((tmp=(uint) item->val_int()) == 0 || tmp > arg_count)
{ {
null_value=1; null_value=1;
return NULL; return NULL;
} }
null_value=0; null_value=0;
return args[tmp-1]->val_str(str); res= args[tmp-1]->val_str(str);
res->set_charset(charset());
return res;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment