Commit 61540a24 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into mc05.(none):/space2/tomas/mysql-4.1-ndb-test

parents 93d97129 0c4187e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,6 +14,6 @@ extra_configs="$pentium_configs"
# fail
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
	--with-embedded-server --enable-thread-safe-client \
	--with-openssl --with-vio --with-raid --without-ndbcluster"
	--with-openssl --with-vio --with-raid --with-ndbcluster"

. "$path/FINISH.sh"
+43 −16
Original line number Diff line number Diff line
@@ -12,15 +12,17 @@ use Getopt::Long;

$opt_help    = 0;
$opt_version = 0;
$opt_verbose = 0;
$opt_target  = "mysql-copyright-target-";
$opt_target .= `date +%d%m%y-%H%M%S`;
chop $opt_target;

GetOptions("help","version","target=s") || error();
GetOptions("help","version","target=s", "verbose") || error();

# fix the directory prefix for target dir

$WD= cwd();
my $win_flag = 0;
$opt_target= $WD . '/' . $opt_target;

&main();
@@ -50,6 +52,7 @@ sub main
  for ($i=0; $ARGV[$i]; $i++)
  {
    my $distfile= $ARGV[$i];
    $win_flag = ($distfile =~ /win-src/) ? 1 : 0;
    my $dir;

    $dir= "mysql-copyright-";    
@@ -66,20 +69,19 @@ sub main
    }
    # if the distfile is mysql-3.22.22-alpha.tar.gz, then
    # distname is 'mysql-3.22.22-alpha' and suffix '.tar.gz'
    if ($distfile =~ m/^($REG_BASENAME)([\-\_])
	($REG_VERSION){1}([\.\-\+])
	(.*)?$/xo) 
    if ($distfile =~
      m/^($REG_BASENAME)([\-\_])($REG_VERSION){1}([\.\-\+]\w+\-\w+)?[\.\-\+](.*)?$/xo) 
    {
      $distname= $1.$2.$3;
      $suffix= $5.$6;
      $suffix= $5;
      $fileext = $6;
      $newdistname= $1."com".$2.$3;
      $newdistname .= $suffix if $win_flag;
    }
    # find out the extract path (should be same as distname!)
    chomp($destdir= `tar ztf ../$distfile | head -1`);
    # remove slash from the end
    $destdir= substr($destdir, 0, -1);
		print "destdir: $destdir\n";
		print "distname: $distname\n";
    
    if ("$destdir" ne "$distname")
    {
@@ -103,26 +105,49 @@ sub main
    
    # remove readline subdir and update configure accordingly
    system("rm -rf $destdir/cmd-line-utils/readline");
		unlink ("$destdir/configure") or die "Can't delete $destdir/configure: $!\n";
		`(cd $destdir ; sed -e 's!\ cmd-line-utils\/readline\/Makefile\ dnl!!g' < configure.in > configure.in.new)`;
		rename ("$destdir/configure.in.new","$destdir/configure.in") or die "Can't rename $destdir/configure.in.new: $!\n";;
		`(cd $destdir ; autoconf)`;
    if ($win_flag) {
      chdir("$destdir") or (print "$! Unable to change directory to $desdir!\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";
      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);
      `autoconf`;
      if (! -f "configure") {
        print "\"./configure\" was not produced, exiting!\n";
        exit(0);
      }
    }

    # fix file copyrights
    &fix_usage_copyright();
    &add_copyright();
    
    # rename the directory with new distribution name
    chdir("$WD/$dir");
    print "renaming $destdir $newdistname\n" if $opt_verbose; 
    rename($destdir, $newdistname);
    
    # tar the new distribution
    `tar cz -f $opt_target/$newdistname.tar.gz *`;
    `tar cz -f $WD/$newdistname.tar.gz $newdistname`;
    $pec= $? >> 8;
    abort($dir, "Making new tar archive failed!\n") if ($pec);
  
    # remove temporary directory
    chdir "..";
    `rm -rf $dir/`;
    chdir($WD) or print "$! Unable to move up one dir\n";
    my $cwd = getcwd();
    print "current dir is $cwd\n" if $opt_verbose ;
    print "deleting temp dir $dir\n" if $opt_verbose; 
    if (-d $dir) {
      system("rm -rf $dir") or print "$! Unable to delete $dir!\n";
    }

  }
  exit(0);
}  
@@ -138,7 +163,7 @@ sub fix_usage_copyright
  foreach my $Cfile (@Cfiles)
  {
    chop $Cfile;
    `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- $Cfile`;
    `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$Cfile"` if -f $Cfile; 
  }
}

@@ -152,7 +177,9 @@ sub add_copyright
  foreach my $file (@files)
  {
    chop $file;
    `$WD/Build-tools/mysql-copyright-2 $file`;
    next if ! -f $file;
    next if -B $file;
    `$WD/Build-tools/mysql-copyright-2 "$file"`;
  }
}

+1 −0
Original line number Diff line number Diff line
@@ -1452,6 +1452,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
      ;;
  esac

  AM_CONDITIONAL(HAVE_NDBCLUSTER_DB, test "have_ndbcluster" = "yes")
  AC_SUBST(ndbcluster_includes)
  AC_SUBST(ndbcluster_libs)
  AC_SUBST(ndbcluster_system_libs)
+9 −10
Original line number Diff line number Diff line
@@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"",
DYNAMIC_STRING ds_res;
static void die(const char *fmt, ...);
static void init_var_hash();
static VAR* var_from_env(const char *, const char *);
static byte* get_var_key(const byte* rec, uint* len,
			 my_bool __attribute__((unused)) t);
static VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
@@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
    if (!(v = (VAR*) hash_search(&var_hash, save_var_name,
			       var_name - save_var_name)))
    {
      if (ignore_not_existing)
	DBUG_RETURN(0);
      if (end)
	*(char*) end = 0;
      die("Variable '%s' used uninitialized", save_var_name);
      char c=*var_name, *s=(char*)var_name;;
      *s=0;
      v=var_from_env(save_var_name, "");
      *s=c;
    }
    --var_name;					/* Point at last character */
  }
@@ -2580,7 +2580,7 @@ static void var_free(void *v)
}


static void var_from_env(const char *name, const char *def_val)
static VAR* var_from_env(const char *name, const char *def_val)
{
  const char *tmp;
  VAR *v;
@@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val)

  v = var_init(0, name, 0, tmp, 0);
  my_hash_insert(&var_hash, (byte*)v);
  return v;
}


@@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql)
  if (hash_init(&var_hash, charset_info, 
                1024, 0, 0, get_var_key, var_free, MYF(0)))
    die("Variable hash initialization failed");
  var_from_env("MASTER_MYPORT", "9306");
  var_from_env("SLAVE_MYPORT", "9307");
  var_from_env("MYSQL_TEST_DIR", "/tmp");
  var_from_env("BIG_TEST", opt_big_test ? "1" : "0");
  if (opt_big_test)
    my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0, "1",0));
  v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0);
  my_hash_insert(&var_hash, (byte*) v);
  v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
+13 −14
Original line number Diff line number Diff line
@@ -2905,7 +2905,6 @@ then
    NDB_DEFS="-DNDEBUG"
    CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_RELEASE_LOC)"
  fi
fi

AC_SUBST([NDB_DEFS])

@@ -2928,13 +2927,7 @@ then
fi
AC_SUBST([ndb_bin_am_ldflags])
AC_SUBST([ndb_opt_test_subdirs])

AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)

# Output results
AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
   ndb/docs/Makefile dnl
   ndb/Makefile ndb/include/Makefile dnl
AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
   ndb/src/Makefile ndb/src/common/Makefile dnl
   ndb/tools/Makefile dnl
   ndb/src/common/debugger/Makefile ndb/src/common/debugger/signaldata/Makefile dnl
@@ -2976,7 +2969,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
   ndb/test/ndbapi/Makefile dnl
   ndb/test/ndbapi/bank/Makefile dnl
   ndb/test/tools/Makefile dnl
   ndb/test/run-test/Makefile dnl
   ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
   )
fi

AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)

# Output results
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
 strings/Makefile regex/Makefile heap/Makefile dnl
 bdb/Makefile dnl
 myisam/Makefile myisammrg/Makefile dnl
@@ -2989,15 +2989,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
 merge/Makefile dbug/Makefile scripts/Makefile dnl
 include/Makefile sql-bench/Makefile tools/Makefile dnl
 tests/Makefile Docs/Makefile support-files/Makefile dnl
 support-files/MacOSX/Makefile mysql-test/Makefile mysql-test/ndb/Makefile dnl
 support-files/MacOSX/Makefile mysql-test/Makefile dnl
 netware/Makefile dnl
 include/mysql_version.h dnl
 cmd-line-utils/Makefile dnl
 cmd-line-utils/libedit/Makefile dnl
 cmd-line-utils/readline/Makefile dnl
 , , [
  test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
 ])
 cmd-line-utils/readline/Makefile)
 AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 AC_OUTPUT

rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
echo
Loading