Commit ee6b3f8a authored by unknown's avatar unknown

item_strfunc.cc:

  We don't need to copy if start is 0, we can return the original value.


sql/item_strfunc.cc:
  We don't need to copy if start is 0, we can return the original value.
parent c5644dbe
......@@ -982,6 +982,8 @@ String *Item_func_right::val_str(String *str)
never return a value more than "length".
*/
uint start=res->numchars()-(uint) length;
if (!start)
return res;
start=res->charpos(start);
tmp_value.set(*res,start,res->length()-start);
return &tmp_value;
......
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