Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2078 06/03/09 00:40:52 kent@stripped +3 -0
Merge
mysql-test/mysql-test-run.pl
1.77 06/03/09 00:40:46 kent@stripped +4 -86
mysql-test/lib/mtr_misc.pl
1.9 06/03/09 00:24:12 kent@stripped +0 -0
Auto merged
mysql-test/lib/mtr_cases.pl
1.17 06/03/09 00:24:12 kent@stripped +0 -2
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kent
# Host: c-4c4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root: /Users/kent/mysql/bk/mysql-5.0-new/RESYNC
--- 1.16/mysql-test/lib/mtr_cases.pl 2006-03-08 16:57:37 +01:00
+++ 1.17/mysql-test/lib/mtr_cases.pl 2006-03-09 00:24:12 +01:00
@@ -155,11 +155,24 @@
if ( $::opt_reorder )
{
@$cases = sort {
- if ( $a->{'master_restart'} and $b->{'master_restart'} or
- ! $a->{'master_restart'} and ! $b->{'master_restart'} )
+ if ( ! $a->{'master_restart'} and ! $b->{'master_restart'} )
{
return $a->{'name'} cmp $b->{'name'};
}
+
+ if ( $a->{'master_restart'} and $b->{'master_restart'} )
+ {
+ my $cmp= mtr_cmp_opts($a->{'master_opt'}, $b->{'master_opt'});
+ if ( $cmp == 0 )
+ {
+ return $a->{'name'} cmp $b->{'name'};
+ }
+ else
+ {
+ return $cmp;
+ }
+ }
+
if ( $a->{'master_restart'} )
{
return 1; # Is greater
--- 1.8/mysql-test/lib/mtr_misc.pl 2006-03-06 22:14:02 +01:00
+++ 1.9/mysql-test/lib/mtr_misc.pl 2006-03-09 00:24:12 +01:00
@@ -13,6 +13,9 @@
sub mtr_path_exists(@);
sub mtr_script_exists(@);
sub mtr_exe_exists(@);
+sub mtr_copy_dir($$);
+sub mtr_same_opts($$);
+sub mtr_cmp_opts($$);
##############################################################################
#
@@ -108,5 +111,44 @@
}
}
+sub mtr_copy_dir($$) {
+ my $srcdir= shift;
+ my $dstdir= shift;
+
+ # Create destination directory
+ mkpath($dstdir);
+ find(\&mtr_copy_one_file, $dstdir);
+}
+
+sub mtr_copy_one_file {
+ print $File::Find::name, "\n";
+}
+
+sub mtr_same_opts ($$) {
+ my $l1= shift;
+ my $l2= shift;
+ return mtr_cmp_opts($l1,$l2) == 0;
+}
+
+sub mtr_cmp_opts ($$) {
+ my $l1= shift;
+ my $l2= shift;
+
+ my @l1= @$l1;
+ my @l2= @$l2;
+
+ return -1 if @l1 < @l2;
+ return 1 if @l1 > @l2;
+
+ while ( @l1 ) # Same length
+ {
+ my $e1= shift @l1;
+ my $e2= shift @l2;
+ my $cmp= ($e1 cmp $e2);
+ return $cmp if $cmp != 0;
+ }
+
+ return 0; # They are the same
+}
1;
--- 1.76/mysql-test/mysql-test-run.pl 2006-03-08 16:57:37 +01:00
+++ 1.77/mysql-test/mysql-test-run.pl 2006-03-09 00:40:46 +01:00
@@ -464,9 +464,9 @@
if ( $glob_cygwin_perl )
{
# Windows programs like 'mysqld' needs Windows paths
- $glob_mysql_test_dir= `cygpath -m $glob_mysql_test_dir`;
+ $glob_mysql_test_dir= `cygpath -m "$glob_mysql_test_dir"`;
my $shell= $ENV{'SHELL'} || "/bin/bash";
- $glob_cygwin_shell= `cygpath -w $shell`; # The Windows path c:\...
+ $glob_cygwin_shell= `cygpath -w "$shell"`; # The Windows path c:\...
chomp($glob_mysql_test_dir);
chomp($glob_cygwin_shell);
}
@@ -973,7 +973,8 @@
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld",
- "$path_client_bindir/mysqld-debug",);
+ "$path_client_bindir/mysqld-debug",
+ "$path_client_bindir/mysqld-max");
$path_language= mtr_path_exists("$glob_basedir/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets");
$exe_my_print_defaults=
@@ -1837,13 +1838,37 @@
if ( ! $glob_use_running_server and ! $glob_use_embedded_server )
{
- if ( $tinfo->{'master_restart'} or
- $master->[0]->{'running_master_is_special'} or
- # Stop if cluster is started but test cases does not need cluster
- ( $opt_with_ndbcluster && $tinfo->{'ndb_test'} != $using_ndbcluster_master ) )
+ # We try to find out if we are to restart the server
+ my $do_restart= 0; # Assumes we don't have to
+
+ if ( $tinfo->{'master_sh'} )
+ {
+ $do_restart= 1; # Always restart if script to run
+ }
+ elsif ( $opt_with_ndbcluster and $tinfo->{'ndb_test'} != $using_ndbcluster_master )
+ {
+ $do_restart= 1; # Restart without cluster
+ }
+ elsif ( $master->[0]->{'running_master_is_special'} and
+ $master->[0]->{'running_master_is_special'}->{'timezone'} eq
+ $tinfo->{'timezone'} and
+ mtr_same_opts($master->[0]->{'running_master_is_special'}->{'master_opt'},
+ $tinfo->{'master_opt'}) )
+ {
+ # If running master was started with special settings, but
+ # the current test requuires the same ones, we *don't* restart.
+ $do_restart= 0;
+ }
+ elsif ( $tinfo->{'master_restart'} or
+ $master->[0]->{'running_master_is_special'} )
+ {
+ $do_restart= 1;
+ }
+
+ if ( $do_restart )
{
stop_masters();
- $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped
+ delete $master->[0]->{'running_master_is_special'}; # Forget history
}
# ----------------------------------------------------------------------
@@ -1930,7 +1955,8 @@
if ( $tinfo->{'master_restart'} )
{
- $master->[0]->{'running_master_is_special'}= 1;
+ # Save this test case information, so next can examine it
+ $master->[0]->{'running_master_is_special'}= $tinfo;
}
}
elsif ( ! $opt_skip_im and $tinfo->{'component_id'} eq 'im' )
| Thread |
|---|
| • bk commit into 5.0 tree (kent:1.2078) | kent | 9 Mar |