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

Merge from 5.1 to 5.5
This commit is contained in:
Nisha Gopalakrishnan 2013-01-12 11:17:03 +05:30
commit b4b960fcca
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;