mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Backport from 5.0 a fix that will start ndb only for tests that needs it
This commit is contained in:
@ -1581,6 +1581,16 @@ sub run_testcase ($) {
|
||||
{
|
||||
$do_restart= 1; # Always restart if script to run
|
||||
}
|
||||
elsif ( $tinfo->{'ndb_test'} and $master->[0]->{'ndbcluster'} == 1 )
|
||||
{
|
||||
$do_restart= 1; # Restart with cluster
|
||||
# print "Restarting because cluster need to be enabled\n";
|
||||
}
|
||||
elsif ($tinfo->{'ndb_test'} == 0 and $master->[0]->{'ndbcluster'} == 0)
|
||||
{
|
||||
$do_restart= 1; # Restart without cluster
|
||||
# print "Restarting because cluster need to be disabled\n";
|
||||
}
|
||||
elsif ( $master->[0]->{'running_master_is_special'} and
|
||||
$master->[0]->{'running_master_is_special'}->{'timezone'} eq
|
||||
$tinfo->{'timezone'} and
|
||||
@ -1646,7 +1656,7 @@ sub run_testcase ($) {
|
||||
|
||||
if ( ! $opt_local_master )
|
||||
{
|
||||
if ( $master->[0]->{'ndbcluster'} )
|
||||
if ( $master->[0]->{'ndbcluster'} && $tinfo->{'ndb_test'})
|
||||
{
|
||||
$master->[0]->{'ndbcluster'}= ndbcluster_start();
|
||||
if ( $master->[0]->{'ndbcluster'} )
|
||||
@ -1659,8 +1669,22 @@ sub run_testcase ($) {
|
||||
{
|
||||
# FIXME not correct location for do_before_start_master()
|
||||
do_before_start_master($tname,$tinfo->{'master_sh'});
|
||||
|
||||
# Save skip_ndbcluster
|
||||
my $save_opt_skip_ndbcluster= $opt_skip_ndbcluster;
|
||||
if (!$tinfo->{'ndb_test'})
|
||||
{
|
||||
# Modify skip_ndbcluster so cluster is skipped for this
|
||||
# and subsequent testcases(until we find one that does not cluster)
|
||||
$opt_skip_ndbcluster= 1;
|
||||
}
|
||||
|
||||
$master->[0]->{'pid'}=
|
||||
mysqld_start('master',0,$tinfo->{'master_opt'},[]);
|
||||
|
||||
# Restore skip_ndbcluster
|
||||
$opt_skip_ndbcluster= $save_opt_skip_ndbcluster;
|
||||
|
||||
if ( ! $master->[0]->{'pid'} )
|
||||
{
|
||||
report_failure_and_restart($tinfo);
|
||||
@ -2026,7 +2050,7 @@ sub mysqld_arguments ($$$$$) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $opt_with_ndbcluster )
|
||||
if ( $opt_with_ndbcluster && !$opt_skip_ndbcluster)
|
||||
{
|
||||
mtr_add_arg($args, "%s--ndbcluster", $prefix);
|
||||
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
|
||||
|
Reference in New Issue
Block a user