Commit 2b957c73 authored by unknown's avatar unknown
Browse files

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.


BitKeeper/deleted/.del-have_ndb_status_ok.require:
  Delete: mysql-test/r/have_ndb_status_ok.require
mysql-test/include/have_ndb.inc:
  Remove the test to check if environment variable NDB_STATUS_OK is set
mysql-test/mysql-test-run.pl:
  Don't set env variable NDB_STATUS_OK or NDB_SLAVE_STATUS_OK
  Use 1 and 0 to indicate if cluster has been installed ok.
parent 5bce387a
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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;

+6 −9
Original line number Diff line number Diff line
@@ -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);
+0 −2
Original line number Diff line number Diff line
ndb_status_ok
YES