Commit 8056f41a authored by unknown's avatar unknown

mysql-test-run.sh:

  added options for ndbcluster


mysql-test/mysql-test-run.sh:
  added options for ndbcluster
parent 404bbc32
......@@ -212,6 +212,8 @@ EXTRA_MYSQL_TEST_OPT=""
EXTRA_MYSQLDUMP_OPT=""
EXTRA_MYSQLBINLOG_OPT=""
USE_RUNNING_SERVER=""
USE_NDBCLUSTER=""
USE_RUNNING_NDBCLUSTER=""
DO_GCOV=""
DO_GDB=""
MANUAL_GDB=""
......@@ -241,6 +243,11 @@ while test $# -gt 0; do
SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
--local) USE_RUNNING_SERVER="" ;;
--extern) USE_RUNNING_SERVER="1" ;;
--with-ndbcluster)
USE_NDBCLUSTER="--with-ndbcluster" ;;
--ndbconnectstring=*)
USE_NDBCLUSTER="--with-ndbcluster" ;
USE_RUNNING_NDBCLUSTER=`$ECHO "$1" | $SED -e "s;--ndbconnectstring=;;"` ;;
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
--local-master)
MASTER_MYPORT=3306;
......@@ -894,6 +901,7 @@ start_master()
--local-infile \
--exit-info=256 \
--core \
$USE_NDBCLUSTER \
--datadir=$MASTER_MYDDIR \
--pid-file=$MASTER_MYPID \
--socket=$MASTER_MYSOCK \
......@@ -919,6 +927,7 @@ start_master()
--character-sets-dir=$CHARSETSDIR \
--default-character-set=$CHARACTER_SET \
--core \
$USE_NDBCLUSTER \
--tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \
--innodb_data_file_path=ibdata1:50M \
......@@ -1402,6 +1411,15 @@ then
fi
fi
if [ ! -z "$USE_NDBCLUSTER" ]
then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
# Kill any running ndbcluster stuff
./ndb/stop_ndbcluster
fi
fi
# Remove files that can cause problems
$RM -f $MYSQL_TEST_DIR/var/run/* $MYSQL_TEST_DIR/var/tmp/*
......@@ -1412,6 +1430,20 @@ then
wait_for_slave=$SLEEP_TIME_FOR_FIRST_SLAVE
$ECHO "Installing Test Databases"
mysql_install_db
if [ ! -z "$USE_NDBCLUSTER" ]
then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
echo "Starting ndbcluster"
./ndb/install_ndbcluster --initial --data-dir=$MASTER_MYDDIR || exit 1
export NDB_CONNECTSTRING=`cat Ndb.cfg`
else
export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
echo "Using ndbcluster at $NDB_CONNECTSTRING"
fi
fi
start_manager
# Do not automagically start daemons if we are in gdb or running only one test
......@@ -1492,6 +1524,15 @@ then
mysql_stop
fi
if [ ! -z "$USE_NDBCLUSTER" ]
then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
# Kill any running ndbcluster stuff
./ndb/stop_ndbcluster
fi
fi
stop_manager
report_stats
$ECHO
......
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