[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2691)
#At lp:maria based on revid:sanja@askmonty.org-20090403132308-1rukse34u7ipth73 2691 Michael Widenius 2009-04-08 Fixed wrong test for extra_ip_sock that caused mysqld to die on Mac if --extra-port was used modified: sql/mysqld.cc sql/sql_string.cc sql/strfunc.cc per-file messages: sql/mysqld.cc 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 === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2009-03-18 02:14:22 +0000 +++ b/sql/mysqld.cc 2009-04-08 20:08:38 +0000 @@ -4974,11 +4974,11 @@ inline void kill_broken_server() #if !defined(__NETWARE__) unix_sock == INVALID_SOCKET || #endif - (!opt_disable_networking && - (base_ip_sock == INVALID_SOCKET || extra_ip_sock != INVALID_SOCKET))) + (!opt_disable_networking && ip_sock == INVALID_SOCKET)) { select_thread_in_use = 0; /* The following call will never return */ + DBUG_PRINT("general", ("killing server because socket is closed")); kill_server(IF_NETWARE(MYSQL_KILL_SIGNAL, (void*) MYSQL_KILL_SIGNAL)); } } === modified file 'sql/sql_string.cc' --- a/sql/sql_string.cc 2008-02-29 13:56:50 +0000 +++ b/sql/sql_string.cc 2009-04-08 20:08:38 +0000 @@ -65,10 +65,10 @@ bool String::real_alloc(uint32 arg_lengt 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)))) === modified file 'sql/strfunc.cc' --- a/sql/strfunc.cc 2007-08-13 13:11:25 +0000 +++ b/sql/strfunc.cc 2009-04-08 20:08:38 +0000 @@ -38,7 +38,8 @@ static const char field_separator=','; -ulonglong find_set(TYPELIB *lib, const char *str, uint length, CHARSET_INFO *cs, +ulonglong find_set(TYPELIB *lib, const char *str, uint length, + CHARSET_INFO *cs, char **err_pos, uint *err_len, bool *set_warning) { CHARSET_INFO *strip= cs ? cs : &my_charset_latin1;
participants (1)
-
Michael Widenius