Commit 64bec50c authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysqltestrun_faster/my50-mysqltestrun_faster

into  neptunus.(none):/home/msvensson/mysql/mysqltestrun_faster/my51-mysqltestrun_faster


mysql-test/lib/mtr_match.pl:
  Auto merged
mysql-test/lib/mtr_stress.pl:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Merge 5.0 -> 5.1, added some comments and set skip if opt_skip_ndbcluster
mysql-test/mysql-test-run.pl:
  Merge backpoort from 5.0 -> 5.1
parents 2d8415ea 406d0ea5
...@@ -252,10 +252,20 @@ sub collect_one_test_case($$$$$$$) { ...@@ -252,10 +252,20 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'slave_restart'}= 1; $tinfo->{'slave_restart'}= 1;
} }
# Cluster is needed by test case if testname contains ndb
if ( ( $::opt_with_ndbcluster or $::glob_use_running_ndbcluster ) and if ( ( $::opt_with_ndbcluster or $::glob_use_running_ndbcluster ) and
defined mtr_match_substring($tname,"ndb") ) defined mtr_match_substring($tname,"ndb") )
{ {
$tinfo->{'ndb_test'}= 1; if ( $::opt_skip_ndbcluster )
{
$tinfo->{'ndb_test'}= 0;
$tinfo->{'skip'}= 1;
return;
}
else
{
$tinfo->{'ndb_test'}= 1;
}
} }
else else
{ {
......
...@@ -1204,6 +1204,7 @@ sub kill_running_server () { ...@@ -1204,6 +1204,7 @@ sub kill_running_server () {
mkpath("$opt_vardir/log"); # Needed for mysqladmin log mkpath("$opt_vardir/log"); # Needed for mysqladmin log
mtr_kill_leftovers(); mtr_kill_leftovers();
$using_ndbcluster_master= 1;
ndbcluster_stop(); ndbcluster_stop();
$master->[0]->{'ndbcluster'}= 1; $master->[0]->{'ndbcluster'}= 1;
ndbcluster_stop_slave(); ndbcluster_stop_slave();
...@@ -1404,6 +1405,7 @@ sub ndbcluster_start ($) { ...@@ -1404,6 +1405,7 @@ sub ndbcluster_start ($) {
} }
if ( $using_ndbcluster_master ) if ( $using_ndbcluster_master )
{ {
# Master already started
return 0; return 0;
} }
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null # FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
...@@ -1913,7 +1915,8 @@ sub run_testcase ($) { ...@@ -1913,7 +1915,8 @@ sub run_testcase ($) {
{ {
if ( $tinfo->{'master_restart'} or if ( $tinfo->{'master_restart'} or
$master->[0]->{'running_master_is_special'} or $master->[0]->{'running_master_is_special'} or
( $tinfo->{'ndb_test'} != $using_ndbcluster_master ) ) # Stop if cluster is started but test cases does not need cluster
( $tinfo->{'ndb_test'} != $using_ndbcluster_master ) )
{ {
stop_masters(); stop_masters();
$master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped
...@@ -1964,12 +1967,16 @@ sub run_testcase ($) { ...@@ -1964,12 +1967,16 @@ sub run_testcase ($) {
{ {
if ( $master->[0]->{'ndbcluster'} ) if ( $master->[0]->{'ndbcluster'} )
{ {
# Cluster is not started
# Call ndbcluster_start to check if test case needs cluster
# Start it if not already started
$master->[0]->{'ndbcluster'}= ndbcluster_start($tinfo->{'ndb_test'}); $master->[0]->{'ndbcluster'}= ndbcluster_start($tinfo->{'ndb_test'});
if ( $master->[0]->{'ndbcluster'} ) if ( $master->[0]->{'ndbcluster'} )
{ {
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
return; return;
} }
} }
if ( ! $master->[0]->{'pid'} ) if ( ! $master->[0]->{'pid'} )
{ {
...@@ -1986,6 +1993,7 @@ sub run_testcase ($) { ...@@ -1986,6 +1993,7 @@ sub run_testcase ($) {
} }
if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} ) if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} )
{ {
# Test needs cluster, start an extra mysqld connected to cluster
$master->[1]->{'pid'}= $master->[1]->{'pid'}=
mysqld_start('master',1,$tinfo->{'master_opt'},[], mysqld_start('master',1,$tinfo->{'master_opt'},[],
$using_ndbcluster_master); $using_ndbcluster_master);
...@@ -2307,15 +2315,15 @@ sub mysqld_arguments ($$$$$$) { ...@@ -2307,15 +2315,15 @@ sub mysqld_arguments ($$$$$$) {
mtr_add_arg($args, "%s--skip-innodb", $prefix); mtr_add_arg($args, "%s--skip-innodb", $prefix);
} }
if ( $opt_skip_ndbcluster ) if ( $opt_skip_ndbcluster || !$using_ndbcluster)
{ {
mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); mtr_add_arg($args, "%s--skip-ndbcluster", $prefix);
} }
if ( $using_ndbcluster ) else
{ {
mtr_add_arg($args, "%s--ndbcluster", $prefix); mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix, mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$opt_ndbconnectstring); $opt_ndbconnectstring);
} }
} }
...@@ -2495,6 +2503,7 @@ sub mysqld_start ($$$$$) { ...@@ -2495,6 +2503,7 @@ sub mysqld_start ($$$$$) {
my $slave_master_info= shift; my $slave_master_info= shift;
my $using_ndbcluster= shift; my $using_ndbcluster= shift;
my $args; # Arg vector my $args; # Arg vector
my $exe; my $exe;
my $pid; my $pid;
......
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