item_strfunc.cc:

  Unnesessary code was removed. Comment was added.
parent 0c91129a
......@@ -975,8 +975,13 @@ String *Item_func_right::val_str(String *str)
if (res->length() <= (uint) length)
return res; /* purecov: inspected */
/*
As far "res" contains at least "length" bytes
(according to the above condition and return),
the below statement is safe. res->numchars() can
never return a value less than "length".
*/
uint start=res->numchars()-(uint) length;
if (start<=0) 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