summaryrefslogtreecommitdiff
path: root/sql/sql_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r--sql/sql_string.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index d661505d1a9..f2c5b2750ef 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -65,10 +65,10 @@ bool String::real_alloc(uint32 arg_length)
bool String::realloc(uint32 alloc_length)
{
- uint32 len=ALIGN_SIZE(alloc_length+1);
- if (Alloced_length < len)
+ if (Alloced_length <= alloc_length)
{
char *new_ptr;
+ uint32 len= ALIGN_SIZE(alloc_length+1);
if (alloced)
{
if (!(new_ptr= (char*) my_realloc(Ptr,len,MYF(MY_WME))))