Commit 0dcb55f4 authored by unknown's avatar unknown
Browse files

Merge for BUG#3759 which was missing from the main tree for some reason.


BitKeeper/etc/logging_ok:
  auto-union
sql/item_cmpfunc.h:
  Auto merged
mysql-test/r/select.result:
  Merge for BUG#3759
mysql-test/t/select.test:
  Merge for BUG#3759
parents 0c9f915e 55ea7c8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -545,3 +545,4 @@ vio/test-sslserver
vio/viotest-ssl
scripts/make_win_binary_distribution
EXCEPTIONS-CLIENT
support-files/my-innodb-heavy-4G.cnf
+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ acurtis@pcgem.rdg.cyberkinetica.com
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com
antony@ltantony.dsl-verizon.net
antony@ltantony.rdg.cyberkinetica.homeunix.net
arjen@bitbike.com
arjen@co3064164-a.bitbike.com
arjen@fred.bitbike.com
@@ -20,8 +21,10 @@ bar@mysql.com
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
brian@brian-akers-computer.local
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
dlenev@mysql.com
@@ -33,6 +36,7 @@ greg@mysql.com
guilhem@mysql.com
gweir@build.mysql.com
gweir@work.mysql.com
hartmut@mysql.com
heikki@donna.mysql.fi
heikki@hundin.mysql.fi
heikki@rescue.
@@ -43,7 +47,9 @@ hf@genie.(none)
igor@hundin.mysql.fi
igor@rurik.mysql.com
ingo@mysql.com
jani@a193-229-222-105.elisa-laajakaista.fi
jani@a80-186-24-72.elisa-laajakaista.fi
jani@a80-186-41-201.elisa-laajakaista.fi
jani@dsl-jkl1657.dial.inet.fi
jani@hynda.(none)
jani@hynda.mysql.fi
@@ -66,6 +72,7 @@ kostja@oak.local
lenz@kallisto.mysql.com
lenz@mysql.com
marko@hundin.mysql.fi
matt@mysql.com
miguel@hegel.(none)
miguel@hegel.br
miguel@hegel.local
@@ -133,6 +140,7 @@ tim@bitch.mysql.fi
tim@black.box
tim@hundin.mysql.fi
tim@sand.box
tim@siva.hindu.god
tim@threads.polyesthetic.msg
tim@white.box
tim@work.mysql.com
+4 −0
Original line number Diff line number Diff line
@@ -288,6 +288,10 @@ unless ($opt_skip_manual)
		system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
		or &abort("Could not update $file.texi in $target_dir/Docs/!");
	}
        system ("rm -f $target_dir/Docs/Images/Makefile*") == 0
        or &abort("Could not remove Makefiles in $target_dir/Docs/Images/!");
        system ("cp $opt_docdir/Docs/Images/*.* $target_dir/Docs/Images") == 0
        or &abort("Could not copy image files in $target_dir/Docs/Images/!");
}

#
+14 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ use Sys::Hostname;
$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0;

GetOptions(
@@ -36,6 +36,7 @@ GetOptions(
	"no-test",
	"no-mysqltest",
	"no-benchmark",
	"one-error",
	"perl-files=s",
	"perl-options=s",
	"raid",
@@ -298,6 +299,7 @@ if ($opt_stage <= 2)
  $command=$make;
  $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
  safe_system($command);
  print LOG "Do-compile: Build successful\n";
}

#
@@ -358,10 +360,16 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
#
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{
  my $force= "";
  if (!$opt_one_error)
  {
    $force= "--force";  # default
  }
  log_timestamp();
  system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
  safe_cd("${test_dir}/mysql-test");
  check_system("./mysql-test-run --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
  check_system("./mysql-test-run $force --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
  # 'mysql-test-run' writes its own final message for log evaluation.
}

#
@@ -535,7 +543,10 @@ Do not run any tests.
Do not run the benchmark test (written in perl)

--no-mysqltest
Do not run the the mysql-test-run test (Same as 'make test')
Do not run the mysql-test-run test (Same as 'make test')

--one-error
Terminate the mysql-test-run test after the first difference (default: use '--force')

--perl-files=list of files
Compile and install the given perl modules.
+123 −28
Original line number Diff line number Diff line
#!/usr/bin/perl -i
#!/usr/bin/perl -wi

# Untar a MySQL distribution, change the copyright texts,
# pack it up again to a given directory

$VER="1.3";
$VER="1.5";

use Cwd;
use File::Basename;
@@ -104,33 +104,24 @@ sub main
    unlink("$destdir/COPYING", "$destdir/EXCEPTIONS-CLIENT");
    copy("$WD/Docs/MySQLEULA.txt", "$destdir");

    # remove readline subdir and update configure accordingly
    system("rm -rf $destdir/cmd-line-utils/readline");
    if ($win_flag) {
      chdir("$destdir") or (print "$! Unable to change directory to $destdir!\n" && exit(0));
    } else {
      chdir("$destdir");
      unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
      open(CONFIGURE,"<configure.in") or die "$! Unable to open configure.in to read from!\n";
      local $/;
      undef $/;
      my $configure = <CONFIGURE>;
      close(CONFIGURE);
      $configure =~ s|cmd\-line\-utils/readline/Makefile dnl\n?||g;
      open(CONFIGURE,">configure.in") or die "$! Unable to open configure.in to write to!\n";
      print CONFIGURE $configure;
      close(CONFIGURE);
      `aclocal && autoheader && aclocal && automake && autoconf`;
      if (! -f "configure") {
        print "\"./configure\" was not produced, exiting!\n";
        exit(0);
      }
    # remove subdirectories 'bdb', 'cmd-line-utils/readline'
    my @extra_fat= ('bdb', 'cmd-line-utils/readline');

    foreach my $fat (@extra_fat)
    {
        &trim_the_fat($fat);
    }

    # fix file copyrights
    &fix_usage_copyright();
    &add_copyright();
   
    # fix LICENSE tag in include/mysql_version.h
    &fix_mysql_version();

    # apply "autotools" - must be last to ensure proper timestamps
    &run_autotools();

    # rename the directory with new distribution name
    chdir("$WD/$dir");
    print "renaming $destdir $newdistname\n" if $opt_verbose; 
@@ -143,7 +134,6 @@ sub main
  
    # remove temporary directory
    chdir($WD) or print "$! Unable to move up one dir\n";
    `cd $WD`;
    my $cwd = getcwd();
    print "current dir is $cwd\n" if $opt_verbose ;
    if (-e $dir) {
@@ -156,6 +146,110 @@ sub main
  exit(0);
}

####
#### This function will s/GPL/Commercial/ in include/mysql_version.h for the
#### LICENSE tag.
####
sub fix_mysql_version
{
  my $cwd= getcwd();
  chdir("$destdir");
  my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h';

  open(MYSQL_VERSION,"<$header_file") or die "Unable to open $header_file for read: $!\n";
  undef $/;
  my $mysql_version= <MYSQL_VERSION>;
  close(MYSQL_VERSION);

  $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/;

  open(MYSQL_VERSION,">$header_file") or die "Unable to open $header_file for write: $!\n";
  print MYSQL_VERSION $mysql_version;
  close(MYSQL_VERSION);
  chdir("$cwd");
}

####
#### This function will remove unwanted parts of a src tree for the mysqlcom
#### distributions.
####

sub trim_the_fat
{
  my $the_fat= shift;
  my $cwd= getcwd();

  chdir("$destdir");
  if ( -d "${the_fat}" )
  {
    system("rm -rf ${the_fat}");
    if (!$win_flag)
    {
      open(CONFIG_IN,"<configure.in") or die "Unable to open configure.in for read: $!\n";
      undef $/;
      my $config_in= <CONFIG_IN>;
      close(CONFIG_IN);

      #
      # If $the_fat Makefile line closes the parenthesis, then
      # replace that line with just the closing parenthesis.
      #
      if ($config_in=~ m|${the_fat}/Makefile\)\n?|)
      {
        $config_in=~ s|${the_fat}/Makefile(\)\n?)|$1|;
      }
      #
      # Else just delete the line
      #
      else
      {
        $config_in=~ s|${the_fat}/Makefile dnl\n?||;
      }

      open(CONFIG_IN,">configure.in") or die "Unable to open configure.in for write: $!\n";
      print CONFIG_IN $config_in;
      close(CONFIG_IN);
    }
  }
  chdir("$cwd");
}


####
#### This function will run the autotools on the reduced source tree.
####

sub run_autotools
{
  my $cwd= getcwd();

  if (!$win_flag)
  {
    chdir("$destdir");
    unlink ("configure") or die "Can't delete $destdir/configure: $!\n";

    # File "configure.in" has already been modified by "trim_the_fat()"

    # It must be ensured that the timestamps of the relevant files are really 
    # ascending, for otherwise the Makefile may cause a re-run of these
    # autotools. Experience shows that deletion is the only safe way.
    unlink ("config.h.in") or die "Can't delete $destdir/config.h.in: $!\n";
    unlink ("aclocal.m4") or die "Can't delete $destdir/aclocal.m4: $!\n";

    # These sleep commands also ensure the ascending order.
    `aclocal && sleep 2 && autoheader && sleep 2 && automake && sleep 2 && autoconf`;
    die "'./configure' was not produced!" unless (-f "configure");

    if (-d "autom4te.cache") {
      print "Trying to delete autom4te.cache dir\n" if $opt_verbose;
      system("rm -rf autom4te.cache") or print "Unable to delete autom4te.cache dir: $!\n";
    }

    chdir("$cwd");
  }
}


####
#### mysqld and MySQL client programs have a usage printed with --help.
#### This usage includes a copyright, which needs to be modified
@@ -187,6 +281,7 @@ sub add_copyright
  foreach my $file (@files)
  {
    next if ! -f $file;
    next if -B $file;
    print "processing file $file in cwd $cwd\n" if $opt_verbose;
    `$WD/Build-tools/mysql-copyright-2 "$file"`;
  }
Loading