Commit b4b960fc authored by Nisha Gopalakrishnan's avatar Nisha Gopalakrishnan

BUG#11757250: REPLACE(...) INSIDE A STORED PROCEDURE.

Merge from 5.1 to 5.5
parents b11fe1b8 3d9d0e77
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment