1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

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
This commit is contained in:
Michael Widenius
2009-04-08 23:08:38 +03:00
parent 8b0c4b7773
commit b09c0acd4e
3 changed files with 6 additions and 5 deletions

View File

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