Commit 29a78e7e authored by joerg@mysql.com's avatar joerg@mysql.com

Merge mysql.com:/M41/mysql-4.1 into mysql.com:/M41/push-4.1

parents a7b877df ea5899a6
...@@ -12,6 +12,7 @@ $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_su ...@@ -12,6 +12,7 @@ $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_su
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_bundled_zlib=$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_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0; $opt_bundled_zlib=$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_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0; $opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
$global_step="";
GetOptions( GetOptions(
"bdb", "bdb",
...@@ -178,7 +179,8 @@ info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\ ...@@ -178,7 +179,8 @@ info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\
info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}"); info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}");
info("PATH is $ENV{PATH}"); info("PATH is $ENV{PATH}");
log_timestamp(); $global_step= "Check MD5, shutdown";
log_timestamp("START");
$md5_result= safe_system("perl $ENV{HOME}/my_md5sum -c ${opt_distribution}.md5"); $md5_result= safe_system("perl $ENV{HOME}/my_md5sum -c ${opt_distribution}.md5");
...@@ -206,9 +208,10 @@ kill_all("mysqlmanager"); ...@@ -206,9 +208,10 @@ kill_all("mysqlmanager");
kill_all("$pwd/host/mysql"); kill_all("$pwd/host/mysql");
kill_all("$pwd/host/test"); kill_all("$pwd/host/test");
$global_step= "directory cleanup";
if ($opt_stage == 0) if ($opt_stage == 0)
{ {
log_timestamp(); log_timestamp("START");
print "$host: Removing old distribution\n" if ($opt_debug); print "$host: Removing old distribution\n" if ($opt_debug);
if (!$opt_use_old_distribution) if (!$opt_use_old_distribution)
{ {
...@@ -254,10 +257,11 @@ safe_cd("$pwd/$host/$ver"); ...@@ -254,10 +257,11 @@ safe_cd("$pwd/$host/$ver");
# #
# Configure the sources # Configure the sources
# #
$global_step= "configure";
if ($opt_stage <= 1) if ($opt_stage <= 1)
{ {
# Fix files if this is in another timezone than the build host # Fix files if this is in another timezone than the build host
log_timestamp(); log_timestamp("START");
unlink("config.cache"); unlink("config.cache");
unlink("bdb/build_unix/config.cache"); unlink("bdb/build_unix/config.cache");
unlink("innobase/config.cache"); unlink("innobase/config.cache");
...@@ -310,29 +314,33 @@ if ($opt_stage <= 1) ...@@ -310,29 +314,33 @@ if ($opt_stage <= 1)
{ {
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include"); safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
} }
log_timestamp("DONE ");
} }
# #
# Compile the binaries # Compile the binaries
# #
$global_step= "compile + link";
if ($opt_stage <= 2) if ($opt_stage <= 2)
{ {
my ($command); my ($command);
log_timestamp(); log_timestamp("START");
unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution); unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution);
$command=$make; $command=$make;
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne ""); $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
safe_system($command); safe_system($command);
print LOG "Do-compile: Build successful\n"; print LOG "Do-compile: Build successful\n";
log_timestamp("DONE ");
} }
# #
# Create the binary distribution # Create the binary distribution
# #
$global_step= "pack binary distribution";
if ($opt_stage <= 3) if ($opt_stage <= 3)
{ {
log_timestamp("START");
my $flags= ""; my $flags= "";
log_timestamp();
log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz"); log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz");
# No need to add the debug symbols, if the binaries are not stripped (saves space) # No need to add the debug symbols, if the binaries are not stripped (saves space)
unless ($opt_with_debug || $opt_no_strip) unless ($opt_with_debug || $opt_no_strip)
...@@ -353,6 +361,7 @@ if ($opt_stage <= 3) ...@@ -353,6 +361,7 @@ if ($opt_stage <= 3)
safe_system("cp client/mysqladmin $pwd/$host/bin"); safe_system("cp client/mysqladmin $pwd/$host/bin");
} }
safe_system("$make clean") if ($opt_with_small_disk); safe_system("$make clean") if ($opt_with_small_disk);
log_timestamp("DONE ");
} }
$tar_file=<$pwd/$host/mysql*.t*gz>; $tar_file=<$pwd/$host/mysql*.t*gz>;
...@@ -367,11 +376,13 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit ...@@ -367,11 +376,13 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit
# Unpack the binary distribution # Unpack the binary distribution
# #
if ($opt_stage <= 4 && !$opt_no_test) if ($opt_stage <= 4 && !$opt_no_test)
$global_step= "extract binary distribution";
{ {
log_timestamp(); log_timestamp("START");
rm_all(<$pwd/$host/test/*>); rm_all(<$pwd/$host/test/*>);
safe_cd("$pwd/$host/test"); safe_cd("$pwd/$host/test");
safe_system("gunzip < $tar_file | $tar xf -"); safe_system("gunzip < $tar_file | $tar xf -");
log_timestamp("DONE ");
} }
$tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/; $tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/;
...@@ -384,30 +395,36 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . ...@@ -384,30 +395,36 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
# Run the test suite # Run the test suite
# #
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
$global_step= "tests in default mode";
{ {
log_timestamp("START");
my $flags= ""; my $flags= "";
$flags.= " --with-ndbcluster" if ($opt_with_cluster); $flags.= " --with-ndbcluster" if ($opt_with_cluster);
$flags.= " --force" if (!$opt_one_error); $flags.= " --force" if (!$opt_one_error);
log_timestamp();
info("Running test suite"); info("Running test suite");
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
safe_cd("${test_dir}/mysql-test"); safe_cd("${test_dir}/mysql-test");
check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
$global_step= "tests using prepared statements";
unless ($opt_skip_ps_test) unless ($opt_skip_ps_test)
{ {
log_timestamp(); log_timestamp("START");
info("Running test suite using prepared statements"); info("Running test suite using prepared statements");
check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
} }
$global_step= "tests using embedded server";
unless ($opt_skip_embedded_test) unless ($opt_skip_embedded_test)
{ {
log_timestamp(); log_timestamp("START");
info("Running embedded server test suite"); info("Running embedded server test suite");
# Embedded server and NDB don't jive # Embedded server and NDB don't jive
$flags=~ s/ --with-ndbcluster//; $flags=~ s/ --with-ndbcluster//;
check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "were successful");
log_timestamp("DONE ");
} }
# 'mysql-test-run' writes its own final message for log evaluation. # 'mysql-test-run' writes its own final message for log evaluation.
} }
...@@ -439,10 +456,11 @@ if (!$opt_no_test && !$opt_no_benchmark) ...@@ -439,10 +456,11 @@ if (!$opt_no_test && !$opt_no_benchmark)
# #
# Compile and install the required Perl modules # Compile and install the required Perl modules
# #
$global_step= "installing Perl modules";
if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test && if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test &&
!$opt_no_benchmark) !$opt_no_benchmark)
{ {
log_timestamp(); log_timestamp("START");
safe_cd($test_dir); safe_cd($test_dir);
rm_all("perl"); rm_all("perl");
safe_system("mkdir perl"); safe_system("mkdir perl");
...@@ -471,25 +489,29 @@ if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test && ...@@ -471,25 +489,29 @@ if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test &&
safe_system($opt_static_perl ? "perl Makefile.PL -static $options" : "perl Makefile.PL $options"); safe_system($opt_static_perl ? "perl Makefile.PL -static $options" : "perl Makefile.PL $options");
safe_system("$make ; $sur $make install"); safe_system("$make ; $sur $make install");
} }
log_timestamp("DONE ");
} }
# #
# Run crash-me test # Run crash-me test
# #
$global_step= "crash-me checks";
if ($opt_stage <= 8 && !$opt_no_test && !$opt_no_crash_me) if ($opt_stage <= 8 && !$opt_no_test && !$opt_no_crash_me)
{ {
log_timestamp(); log_timestamp("START");
safe_cd("$test_dir/sql-bench"); safe_cd("$test_dir/sql-bench");
log_system("rm -f limits/mysql.cfg"); log_system("rm -f limits/mysql.cfg");
safe_system("perl ./crash-me --force --batch-mode $connect_option"); safe_system("perl ./crash-me --force --batch-mode $connect_option");
log_timestamp("DONE ");
} }
# #
# Run sql-bench Benchmarks # Run sql-bench Benchmarks
# #
$global_step= "benchmarks";
if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark) if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark)
{ {
log_timestamp(); log_timestamp("START");
safe_cd("$test_dir/sql-bench"); safe_cd("$test_dir/sql-bench");
log_system("rm -f output/*"); log_system("rm -f output/*");
$tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : "";
...@@ -504,6 +526,7 @@ if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark) ...@@ -504,6 +526,7 @@ if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark)
{ {
check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql"); check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql");
} }
log_timestamp("DONE ");
} }
rm_all($bench_tmpdir); rm_all($bench_tmpdir);
...@@ -685,7 +708,7 @@ sub abort ...@@ -685,7 +708,7 @@ sub abort
my($mail_header_file); my($mail_header_file);
print LOG "\n$message\n"; print LOG "\n$message\n";
print "$host: $message\n" if ($opt_debug); print "$host: $message\n" if ($opt_debug);
print LOG "Aborting\n"; log_timestamp("ABORT");
close LOG; close LOG;
if ($opt_user) if ($opt_user)
...@@ -861,6 +884,7 @@ sub kill_all ...@@ -861,6 +884,7 @@ sub kill_all
if (!open(PS, "$pscmd|")) if (!open(PS, "$pscmd|"))
{ {
print "Warning: Can't run $pscmd: $!\n"; print "Warning: Can't run $pscmd: $!\n";
log_timestamp("ABORT");
exit; exit;
} }
...@@ -899,8 +923,10 @@ sub killpid ...@@ -899,8 +923,10 @@ sub killpid
# #
sub log_timestamp sub log_timestamp
{ {
my ($message) = @_;
my @ta=localtime(time()); my @ta=localtime(time());
print LOG sprintf("%4d-%02d-%02d %02d:%02d:%02d\n", print LOG sprintf("%4d-%02d-%02d %02d:%02d:%02d %s %s\n",
$ta[5]+1900, $ta[4]+1, $ta[3], $ta[2], $ta[1], $ta[0]); $ta[5]+1900, $ta[4]+1, $ta[3], $ta[2], $ta[1], $ta[0],
$message, $global_step);
} }
...@@ -362,12 +362,13 @@ NdbEventOperationImpl::next(int *pOverrun) ...@@ -362,12 +362,13 @@ NdbEventOperationImpl::next(int *pOverrun)
Uint32 *aDataPtr = ptr[1].p; Uint32 *aDataPtr = ptr[1].p;
#ifdef EVENT_DEBUG #ifdef EVENT_DEBUG
int i;
printf("after values sz=%u\n", ptr[1].sz); printf("after values sz=%u\n", ptr[1].sz);
for(int i=0; i < ptr[1].sz; i++) for (i=0; i < ptr[1].sz; i++)
printf ("H'%.8X ",ptr[1].p[i]); printf ("H'%.8X ",ptr[1].p[i]);
printf("\n"); printf("\n");
printf("before values sz=%u\n", ptr[2].sz); printf("before values sz=%u\n", ptr[2].sz);
for(int i=0; i < ptr[2].sz; i++) for (i=0; i < ptr[2].sz; i++)
printf ("H'%.8X ",ptr[2].p[i]); printf ("H'%.8X ",ptr[2].p[i]);
printf("\n"); printf("\n");
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment