summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2004-12-24 23:07:10 +0200
committerSinisa@sinisa.nasamreza.org <>2004-12-24 23:07:10 +0200
commitf385e79ad4b16b7a42d3e372886d16dda8b618df (patch)
treea774e5685709b7497bf11430a09f7d7c1e250a27 /sql/item_strfunc.cc
parent71da86aa11441b76e73d1426efec1378a3733278 (diff)
parentd110146252322ea5a4a09dc8cc932c3f95adccde (diff)
downloadmariadb-git-f385e79ad4b16b7a42d3e372886d16dda8b618df.tar.gz
4.0 -> 4.1 merge
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index e1b063cd5e0..068878652e4 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2596,16 +2596,16 @@ String *Item_func_quote::val_str(String *str)
/*
We have to use realloc() instead of alloc() as we want to keep the
- old result in str
+ old result in arg
*/
- if (str->realloc(new_length))
+ if (arg->realloc(new_length))
goto null;
/*
As 'arg' and 'str' may be the same string, we must replace characters
from the end to the beginning
*/
- to= (char*) str->ptr() + new_length - 1;
+ to= (char*) arg->ptr() + new_length - 1;
*to--= '\'';
for (start= (char*) arg->ptr(),end= start + arg_length; end-- != start; to--)
{
@@ -2633,10 +2633,10 @@ String *Item_func_quote::val_str(String *str)
}
}
*to= '\'';
- str->length(new_length);
+ arg->length(new_length);
str->set_charset(collation.collation);
null_value= 0;
- return str;
+ return arg;
null:
null_value= 1;