summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 893126b7fe6..7fc5e51621e 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -955,8 +955,9 @@ String *Item_func_left::val_str(String *str)
if (res->length() <= (uint) length ||
res->length() <= (char_pos= res->charpos(length)))
return res;
- str_value.set(*res, 0, char_pos);
- return &str_value;
+
+ tmp_value.set(*res, 0, char_pos);
+ return &tmp_value;
}