diff options
author | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-01-14 17:26:30 +0400 |
---|---|---|
committer | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-01-14 17:26:30 +0400 |
commit | 502a9efbcf4e4d9a4db314fcf305e8cedabd18c4 (patch) | |
tree | 7d4d72af4ce944a07e3796381a2278d8edbe9105 /sql | |
parent | c6863b04e0dc05114dcd3b63361e1f114612b121 (diff) | |
download | mariadb-git-502a9efbcf4e4d9a4db314fcf305e8cedabd18c4.tar.gz |
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.
Diffstat (limited to 'sql')
-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; |