diff options
author | bar@bar.intranet.mysql.r18.ru <> | 2004-01-14 17:26:30 +0400 |
---|---|---|
committer | bar@bar.intranet.mysql.r18.ru <> | 2004-01-14 17:26:30 +0400 |
commit | cc215898396ec6dccc900eed193c8ca6a2c77894 (patch) | |
tree | 7d4d72af4ce944a07e3796381a2278d8edbe9105 /sql/item_strfunc.cc | |
parent | 362d697c9f26589be1a0ce294eb316ce99068815 (diff) | |
download | mariadb-git-cc215898396ec6dccc900eed193c8ca6a2c77894.tar.gz |
item_strfunc.cc:
We don't need to copy if start is 0, we can return the original value.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 45b2b7455f9..f810afa3cfa 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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; |