From 631aac9d0043532454d166dcc178c846aa7dbda7 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 4 Mar 2005 10:22:50 +0100 Subject: [PATCH 1/7] Prevent a collision with the system's '#define errno ...' by guarding the variable declaration. --- include/my_sys.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/my_sys.h b/include/my_sys.h index 0fdb8d640e7..d6104a6a3a9 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -193,11 +193,13 @@ void __CDECL hfree(void *ptr); #endif #endif /* MSDOS */ +#ifndef errno /* did we already get it? */ #ifdef HAVE_ERRNO_AS_DEFINE #include /* errno is a define */ #else extern int errno; /* declare errno */ #endif +#endif /* #ifndef errno */ extern const char ** NEAR my_errmsg[]; extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; extern char *home_dir; /* Home directory for user */ From 136c1ea181043bf3dcf13dd3e635535dd27f9597 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 4 Mar 2005 11:07:56 +0100 Subject: [PATCH 2/7] Changed C++ style comment to C style for 'sql/net_serv.cc' which will be symlinked to 'libmysql/net.c'. --- sql/net_serv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index cad1f041005..c527ee1eb76 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -227,7 +227,7 @@ int my_net_write(NET *net,const char *packet,ulong len) { uchar buff[NET_HEADER_SIZE]; - if (unlikely(!net->vio)) // nowhere to write + if (unlikely(!net->vio)) /* nowhere to write */ return 0; /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH From 6ccbe89d527b6a8a35f17c45c4b597ee3853410b Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 4 Mar 2005 11:26:08 +0100 Subject: [PATCH 3/7] Qualify 'inline' functions as 'static inline' to please the Sun C compiler. --- mysys/hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysys/hash.c b/mysys/hash.c index 973f6f7cefa..3ee575a9c98 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -87,7 +87,7 @@ void hash_free(HASH *hash) handle inline functions that are not defined as native types */ -inline char* +static inline char* hash_key(HASH *hash,const byte *record,uint *length,my_bool first) { if (hash->get_key) @@ -183,8 +183,8 @@ uint calc_hashnr_caseup(const byte *key, uint len) /* for compilers which can not handle inline */ -#if !defined(__SUNPRO_C) && !defined(__USLC__) && !defined(__sgi) -inline +#if !defined(__USLC__) && !defined(__sgi) +static inline #endif unsigned int rec_hashnr(HASH *hash,const byte *record) { From 4e136e8d1ae3dda32b24c8b7ec0fd35f0cbef9f7 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 4 Mar 2005 12:31:30 +0100 Subject: [PATCH 4/7] Please the Sun C compiler by qualifying 'inline' as 'static inline'. --- mysys/my_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 8834dda98e1..9662f219418 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -27,7 +27,7 @@ #include #include -inline void bitmap_lock(MY_BITMAP* map) +static inline void bitmap_lock(MY_BITMAP* map) { #ifdef THREAD if (map->thread_safe) @@ -35,7 +35,7 @@ inline void bitmap_lock(MY_BITMAP* map) #endif } -inline void bitmap_unlock(MY_BITMAP* map) +static inline void bitmap_unlock(MY_BITMAP* map) { #ifdef THREAD if (map->thread_safe) From c4feaafdcbcd197bdd6b647a8f75a11a89fdb00b Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Mon, 7 Mar 2005 16:23:55 +0100 Subject: [PATCH 5/7] Avoid empty build (failure) mails on Solaris (backport from 4.1). --- Build-tools/Do-compile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 1f83a9a37e1..5756d06a116 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -617,16 +617,20 @@ sub abort if ($opt_user) { - $mail_header_file="$opt_tmp/do-command.$$"; - open(TMP,">$mail_header_file"); + # Take the last 40 lines of the build log + open(LOG, "$log") or die $!; + my @log= ; + close LOG; + splice @log => 0, -40; + my $mail_file="$opt_tmp/do-command.$$"; + open(TMP,">$mail_file") or die $!; print TMP "From: mysqldev\@$full_host_name\n"; print TMP "To: $email\n"; print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n"; + print TMP @log; close TMP; - system("tail -n 40 $log > $log.mail"); - system("cat $mail_header_file $log.mail | $sendmail -t -f $email"); - unlink($mail_header_file); - unlink("$log.mail"); + system("$sendmail -t -f $email < $mail_file"); + unlink($mail_file); } exit 1; } From 00449b8f9c6fdb87caf7c5e683e605db4a3fee78 Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Mon, 7 Mar 2005 18:56:18 +0300 Subject: [PATCH 6/7] Fix for bug#8978 : Crash on 'select format ...' --- sql/item_strfunc.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index aeb63d6af00..ec88f58aa93 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1465,7 +1465,8 @@ Item_func_format::Item_func_format(Item *org,int dec) :Item_str_func(org) String *Item_func_format::val_str(String *str) { double nr =args[0]->val(); - uint32 diff,length,str_length; + uint32 length,str_length; + int diff; uint dec; if ((null_value=args[0]->null_value)) return 0; /* purecov: inspected */ @@ -1483,17 +1484,17 @@ String *Item_func_format::val_str(String *str) if (str_length >= dec+4) { char *tmp,*pos; - length= str->length()+(diff=(str_length- dec-1)/3); + length= str->length()+(diff= (int)(str_length- dec-1)/3); str= copy_if_not_alloced(&tmp_str,str,length); str->length(length); tmp= (char*) str->ptr()+length - dec-1; for (pos= (char*) str->ptr()+length-1; pos != tmp; pos--) - pos[0]= pos[-(int) diff]; + pos[0]= pos[-diff]; while (diff) { - pos[0]=pos[-(int) diff]; pos--; - pos[0]=pos[-(int) diff]; pos--; - pos[0]=pos[-(int) diff]; pos--; + pos[0]=pos[-diff]; pos--; + pos[0]=pos[-diff]; pos--; + pos[0]=pos[-diff]; pos--; pos[0]=','; pos--; diff--; From 8948e774f611211f7136ed1493d9d011145dbad5 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Tue, 8 Mar 2005 11:42:21 +0100 Subject: [PATCH 7/7] - bumped up version number in configure.in from 4.0.24 -> 4.0.25 (ChangeSet 1.2073 was already tagged as 4.0.24) --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 8b8c0690a55..36473de7ad1 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 4.0.24) +AM_INIT_AUTOMAKE(mysql, 4.0.25) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10