Make have_ndb.in portable

parent 7e3593de
--exec test x$NDB_STATUS_OK = x1 # Check that server is compiled and started with support for NDB
-- require r/have_ndb.require -- require r/have_ndb.require
disable_query_log; 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
-- require r/have_ndb_status_ok.require
disable_query_log;
eval select "$NDB_STATUS_OK" as ndb_status_ok;
enable_query_log;
...@@ -1175,6 +1175,7 @@ sub environment_setup () { ...@@ -1175,6 +1175,7 @@ sub environment_setup () {
$ENV{'MYSQL_TCP_PORT'}= 3306; $ENV{'MYSQL_TCP_PORT'}= 3306;
$ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port; $ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port;
$ENV{'NDB_STATUS_OK'}= "YES";
$ENV{'IM_PATH_PID'}= $instance_manager->{path_pid}; $ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
$ENV{'IM_PORT'}= $instance_manager->{port}; $ENV{'IM_PORT'}= $instance_manager->{port};
...@@ -1661,6 +1662,7 @@ sub mysql_install_db () { ...@@ -1661,6 +1662,7 @@ sub mysql_install_db () {
mtr_report("ndbcluster_install failed, continuing without cluster"); mtr_report("ndbcluster_install failed, continuing without cluster");
$opt_with_ndbcluster= 0; $opt_with_ndbcluster= 0;
$flag_ndb_status_ok= 0; $flag_ndb_status_ok= 0;
$ENV{'NDB_STATUS_OK'}= "NO";
} }
else else
{ {
...@@ -1682,7 +1684,7 @@ sub install_db ($$) { ...@@ -1682,7 +1684,7 @@ sub install_db ($$) {
my $init_db_sql_tmp= "/tmp/init_db.sql$$"; my $init_db_sql_tmp= "/tmp/init_db.sql$$";
my $args; my $args;
mtr_report("Installing \u$type Databases"); mtr_report("Installing \u$type Database");
open(IN, $init_db_sql) open(IN, $init_db_sql)
or mtr_error("Can't open $init_db_sql: $!"); or mtr_error("Can't open $init_db_sql: $!");
...@@ -2935,7 +2937,6 @@ sub run_mysqltest ($) { ...@@ -2935,7 +2937,6 @@ sub run_mysqltest ($) {
$ENV{'CHARSETSDIR'}= $path_charsetsdir; $ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults; $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
$ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok;
$ENV{'NDB_MGM'}= $exe_ndb_mgm; $ENV{'NDB_MGM'}= $exe_ndb_mgm;
$ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir; $ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir;
$ENV{'NDB_DATA_DIR'}= $path_ndb_data_dir; $ENV{'NDB_DATA_DIR'}= $path_ndb_data_dir;
......
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