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