From 16c07bd02cbd84efc0af88ef69cd0f55975a18bd Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Mon, 18 Sep 2006 12:45:04 +0200 Subject: [PATCH] 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. --- mysql-test/include/have_ndb.inc | 8 -------- mysql-test/mysql-test-run.pl | 15 ++++++--------- mysql-test/r/have_ndb_status_ok.require | 2 -- 3 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 mysql-test/r/have_ndb_status_ok.require diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc index 8c277ea82a0..8828d77072c 100644 --- a/mysql-test/include/have_ndb.inc +++ b/mysql-test/include/have_ndb.inc @@ -4,12 +4,4 @@ disable_query_log; show variables like "have_ndbcluster"; 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; - diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b33afcd6696..7fd376628b1 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1064,7 +1064,7 @@ sub command_line_setup () { connect_string => "$opt_ndbconnectstring", path_pid => "$data_dir/ndb_3.pid", # Nodes + 1 pid => 0, # pid of ndb_mgmd - installed_ok => 'NO', + installed_ok => 0, }; $data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port_slave"; @@ -1077,7 +1077,7 @@ sub command_line_setup () { connect_string => "$opt_ndbconnectstring_slave", path_pid => "$data_dir/ndb_2.pid", # Nodes + 1 pid => 0, # pid of ndb_mgmd - installed_ok => 'NO', + installed_ok => 0, }; # Init pids of ndbd's @@ -2278,21 +2278,18 @@ sub mysql_install_db () { next if !$cluster->{'pid'}; - $cluster->{'installed_ok'}= "YES"; # Assume install suceeds + $cluster->{'installed_ok'}= 1; # Assume install suceeds if (ndbcluster_wait_started($cluster, "")) { # failed to install, disable usage and flag that its no ok mtr_report("ndbcluster_install of $cluster->{'name'} failed"); - $cluster->{"installed_ok"}= "NO"; + $cluster->{"installed_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 ( $opt_force) @@ -2503,7 +2500,7 @@ sub run_testcase_check_skip_test($) } # 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_failed($tinfo); @@ -2512,7 +2509,7 @@ sub run_testcase_check_skip_test($) # If test needs slave cluster, check that it installed ok 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_failed($tinfo); diff --git a/mysql-test/r/have_ndb_status_ok.require b/mysql-test/r/have_ndb_status_ok.require deleted file mode 100644 index 8a82871234b..00000000000 --- a/mysql-test/r/have_ndb_status_ok.require +++ /dev/null @@ -1,2 +0,0 @@ -ndb_status_ok -YES