diff options
author | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-01-13 17:27:21 +0400 |
---|---|---|
committer | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-01-13 17:27:21 +0400 |
commit | bf7e46938b8c79f5f9279adb671b7ab56f694435 (patch) | |
tree | ca525cdf383cc3f4909cbc7b8ab714d8e1ea8dcb /sql/item_strfunc.cc | |
parent | 491ab7f72e37ae16531567c21df4be11e9f6a0db (diff) | |
download | mariadb-git-bf7e46938b8c79f5f9279adb671b7ab56f694435.tar.gz |
item_strfunc.cc:
Unnesessary code was removed. Comment was added.
sql/item_strfunc.cc:
Unnesessary code was removed. Comment was added.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index fdacc4ec536..528345beb77 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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; |