summaryrefslogtreecommitdiff
path: root/client
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 /client
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 'client')
-rw-r--r--client/sql_string.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 0ad79ba5633..c404cc6b09f 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -691,7 +691,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;