diff options
author | Michael Widenius <monty@askmonty.org> | 2009-04-08 23:08:38 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-04-08 23:08:38 +0300 |
commit | b09c0acd4ef124c33111c48a76be987500ff39f9 (patch) | |
tree | 7c9a1c1a36d23a814477640768d0f7af6aaa6e68 /sql/sql_string.cc | |
parent | 8b0c4b7773ca86d7b68338aefd1627753eaeb0fd (diff) | |
download | mariadb-git-b09c0acd4ef124c33111c48a76be987500ff39f9.tar.gz |
Fixed wrong test for extra_ip_sock that caused mysqld to die on Mac if --extra-port was used
sql/sql_string.cc:
Optimized tests to do fewer reallocs
sql/strfunc.cc:
Indentation fix
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 34b310931d6..4b2450c0093 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)))) |