summaryrefslogtreecommitdiff
path: root/sql/sql_string.cc
diff options
context:
space:
mode:
authorNisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>2013-01-12 11:17:03 +0530
committerNisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>2013-01-12 11:17:03 +0530
commit0ac6c5facc17f7b963dcb16cfb7c257a7670b26d (patch)
tree5de03fd64acae21c1369c24c12a54fb1f88e0cf9 /sql/sql_string.cc
parent3b4b050c5b789b4f5e6b6f2c8c726bc724a2733d (diff)
parentc4afaa42423d664477ca5df6cb45f49860381bfc (diff)
downloadmariadb-git-0ac6c5facc17f7b963dcb16cfb7c257a7670b26d.tar.gz
BUG#11757250: REPLACE(...) INSIDE A STORED PROCEDURE.
Merge from 5.1 to 5.5
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r--sql/sql_string.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index fcd134aff04..22059c3a99c 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -732,7 +732,7 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
{
if (from->Alloced_length >= from_length)
return from;
- if (from->alloced || !to || from == to)
+ if ((from->alloced && (from->Alloced_length != 0)) || !to || from == to)
{
(void) from->realloc(from_length);
return from;