From bda53f8c1e3b340333585b6898b2092a8d569aea Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Mar 2005 16:23:55 +0100 Subject: [PATCH 1/3] Avoid empty build (failure) mails on Solaris (backport from 4.1). Build-tools/Do-compile: Backport of a change Lenz did in 4.1 (without it, Solaris sends empty mails): Improved the abort subroutine to not rely on an external "tail" command (the default /usr/bin/tail on Solaris does not understand the "-n" notation). Get rid of a "useless use of cat" case in the process. --- 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 fd35e7870a6ab76d892756bdf1d7a85c3361147b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Mar 2005 18:56:18 +0300 Subject: [PATCH 2/3] 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 395618a65111301d76373dbd84763b91a02b993a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Mar 2005 11:42:21 +0100 Subject: [PATCH 3/3] - 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: - bumped up version number from 4.0.24 -> 4.0.25 --- 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