mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
No need to use environment variable NDB_STATUS_OK and NDB_SLAVE_STATUS_OK anymore
when mysql-test-run.pl has full control of all ndb processes. It will now know if install has failed.
This commit is contained in:
@ -4,12 +4,4 @@ disable_query_log;
|
|||||||
show variables like "have_ndbcluster";
|
show variables like "have_ndbcluster";
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
# Check that NDB is installed and known to be working
|
|
||||||
# This will disable ndb from the shell script 'mysql-test-run'
|
|
||||||
|
|
||||||
-- require r/have_ndb_status_ok.require
|
|
||||||
disable_query_log;
|
|
||||||
eval select "$NDB_STATUS_OK" as ndb_status_ok;
|
|
||||||
enable_query_log;
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1064,7 +1064,7 @@ sub command_line_setup () {
|
|||||||
connect_string => "$opt_ndbconnectstring",
|
connect_string => "$opt_ndbconnectstring",
|
||||||
path_pid => "$data_dir/ndb_3.pid", # Nodes + 1
|
path_pid => "$data_dir/ndb_3.pid", # Nodes + 1
|
||||||
pid => 0, # pid of ndb_mgmd
|
pid => 0, # pid of ndb_mgmd
|
||||||
installed_ok => 'NO',
|
installed_ok => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
$data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port_slave";
|
$data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port_slave";
|
||||||
@ -1077,7 +1077,7 @@ sub command_line_setup () {
|
|||||||
connect_string => "$opt_ndbconnectstring_slave",
|
connect_string => "$opt_ndbconnectstring_slave",
|
||||||
path_pid => "$data_dir/ndb_2.pid", # Nodes + 1
|
path_pid => "$data_dir/ndb_2.pid", # Nodes + 1
|
||||||
pid => 0, # pid of ndb_mgmd
|
pid => 0, # pid of ndb_mgmd
|
||||||
installed_ok => 'NO',
|
installed_ok => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
# Init pids of ndbd's
|
# Init pids of ndbd's
|
||||||
@ -2278,21 +2278,18 @@ sub mysql_install_db () {
|
|||||||
|
|
||||||
next if !$cluster->{'pid'};
|
next if !$cluster->{'pid'};
|
||||||
|
|
||||||
$cluster->{'installed_ok'}= "YES"; # Assume install suceeds
|
$cluster->{'installed_ok'}= 1; # Assume install suceeds
|
||||||
|
|
||||||
if (ndbcluster_wait_started($cluster, ""))
|
if (ndbcluster_wait_started($cluster, ""))
|
||||||
{
|
{
|
||||||
# failed to install, disable usage and flag that its no ok
|
# failed to install, disable usage and flag that its no ok
|
||||||
mtr_report("ndbcluster_install of $cluster->{'name'} failed");
|
mtr_report("ndbcluster_install of $cluster->{'name'} failed");
|
||||||
$cluster->{"installed_ok"}= "NO";
|
$cluster->{"installed_ok"}= 0;
|
||||||
|
|
||||||
$cluster_started_ok= 0;
|
$cluster_started_ok= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ENV{'NDB_STATUS_OK'}= $clusters->[0]->{'installed_ok'};
|
|
||||||
$ENV{'NDB_SLAVE_STATUS_OK'}= $clusters->[1]->{'installed_ok'};
|
|
||||||
|
|
||||||
if ( ! $cluster_started_ok )
|
if ( ! $cluster_started_ok )
|
||||||
{
|
{
|
||||||
if ( $opt_force)
|
if ( $opt_force)
|
||||||
@ -2503,7 +2500,7 @@ sub run_testcase_check_skip_test($)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# If test needs cluster, check that master installed ok
|
# If test needs cluster, check that master installed ok
|
||||||
if ( $tinfo->{'ndb_test'} and $clusters->[0]->{'installed_ok'} eq "NO" )
|
if ( $tinfo->{'ndb_test'} and !$clusters->[0]->{'installed_ok'} )
|
||||||
{
|
{
|
||||||
mtr_report_test_name($tinfo);
|
mtr_report_test_name($tinfo);
|
||||||
mtr_report_test_failed($tinfo);
|
mtr_report_test_failed($tinfo);
|
||||||
@ -2512,7 +2509,7 @@ sub run_testcase_check_skip_test($)
|
|||||||
|
|
||||||
# If test needs slave cluster, check that it installed ok
|
# If test needs slave cluster, check that it installed ok
|
||||||
if ( $tinfo->{'ndb_test'} and $tinfo->{'slave_num'} and
|
if ( $tinfo->{'ndb_test'} and $tinfo->{'slave_num'} and
|
||||||
$clusters->[1]->{'installed_ok'} eq "NO" )
|
!$clusters->[1]->{'installed_ok'} )
|
||||||
{
|
{
|
||||||
mtr_report_test_name($tinfo);
|
mtr_report_test_name($tinfo);
|
||||||
mtr_report_test_failed($tinfo);
|
mtr_report_test_failed($tinfo);
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
ndb_status_ok
|
|
||||||
YES
|
|
Reference in New Issue
Block a user