Commit e19deec1 authored by unknown's avatar unknown

Fix mysql-test-run to work better with NDB

Fix broken string constant in mysqld.cc


mysql-test/mysql-test-run.sh:
  Don't enable NDB when the slave mysqld is started
  Remove the ndbcluster dir from var/ when restarting test
  Set datadir for NDB to @MYSQL_TEST_DIR/var so that ndbcluster dir is created there. Otherwise it will appear as a database in mysqld.
sql/mysqld.cc:
  The string was broken in two lines and failed to compile on some compiler.
  Remove ifdefs around OPT_NDBCLUSTER, it should always be available even when not supported.
parent 689d0a0a
...@@ -1040,7 +1040,7 @@ start_slave() ...@@ -1040,7 +1040,7 @@ start_slave()
--core --init-rpl-role=slave \ --core --init-rpl-role=slave \
--tmpdir=$MYSQL_TMP_DIR \ --tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \ --language=$LANGUAGE \
--skip-innodb --skip-slave-start \ --skip-innodb --skip-ndb --skip-slave-start \
--slave-load-tmpdir=$SLAVE_LOAD_TMPDIR \ --slave-load-tmpdir=$SLAVE_LOAD_TMPDIR \
--report-host=127.0.0.1 --report-user=root \ --report-host=127.0.0.1 --report-user=root \
--report-port=$slave_port \ --report-port=$slave_port \
...@@ -1421,6 +1421,7 @@ then ...@@ -1421,6 +1421,7 @@ then
fi fi
# Remove files that can cause problems # Remove files that can cause problems
$RM -rf $MYSQL_TEST_DIR/var/ndbcluster
$RM -f $MYSQL_TEST_DIR/var/run/* $MYSQL_TEST_DIR/var/tmp/* $RM -f $MYSQL_TEST_DIR/var/run/* $MYSQL_TEST_DIR/var/tmp/*
# Remove old berkeley db log files that can confuse the server # Remove old berkeley db log files that can confuse the server
...@@ -1436,7 +1437,7 @@ then ...@@ -1436,7 +1437,7 @@ then
if [ -z "$USE_RUNNING_NDBCLUSTER" ] if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then then
echo "Starting ndbcluster" echo "Starting ndbcluster"
./ndb/install_ndbcluster --initial --data-dir=$MASTER_MYDDIR || exit 1 ./ndb/install_ndbcluster --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
export NDB_CONNECTSTRING=`cat Ndb.cfg` export NDB_CONNECTSTRING=`cat Ndb.cfg`
else else
export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
......
...@@ -4162,13 +4162,10 @@ Disable with --skip-innodb (will save memory).", ...@@ -4162,13 +4162,10 @@ Disable with --skip-innodb (will save memory).",
Disable with --skip-isam.", Disable with --skip-isam.",
(gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 1, 0, 0, (gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 1, 0, 0,
0, 0, 0}, 0, 0, 0},
#ifdef HAVE_NDBCLUSTER_DB {"ndbcluster", OPT_NDBCLUSTER, "Enable NDB Cluster (if this version of MySQL supports it). \
{"ndbcluster", OPT_NDBCLUSTER, "Enable NDB Cluster (if this version of MySQL
supports it). \
Disable with --skip-ndbcluster (will save memory).", Disable with --skip-ndbcluster (will save memory).",
(gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 1, 0, 0, (gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 1, 0, 0,
0, 0, 0}, 0, 0, 0},
#endif
{"skip-locking", OPT_SKIP_LOCK, {"skip-locking", OPT_SKIP_LOCK,
"Deprecated option, use --skip-external-locking instead.", "Deprecated option, use --skip-external-locking instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
......
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