summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
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;