summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh11
-rw-r--r--mysql-test/ndb/Makefile.am2
-rw-r--r--mysql-test/ndb/ndbcluster.sh16
3 files changed, 17 insertions, 12 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 65be9bf9c8e..fcb9e5eee2d 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -457,6 +457,9 @@ SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
export MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
+NDBCLUSTER_BASE_PORT=`expr $NDBCLUSTER_PORT + 2`
+NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --port-base=$NDBCLUSTER_BASE_PORT --data-dir=$MYSQL_TEST_DIR/var"
+
if [ x$SOURCE_DIST = x1 ] ; then
MY_BASEDIR=$MYSQL_TEST_DIR
else
@@ -939,11 +942,11 @@ start_ndbcluster()
echo "Starting ndbcluster"
if [ "$DO_BENCH" = 1 ]
then
- NDBCLUSTER_OPTS=""
+ NDBCLUSTER_EXTRA_OPTS=""
else
- NDBCLUSTER_OPTS="--small"
+ NDBCLUSTER_EXTRA_OPTS="--small"
fi
- ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT $NDBCLUSTER_OPTS --diskless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
+ ./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --diskless --initial || exit 1
NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT"
else
NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
@@ -961,7 +964,7 @@ stop_ndbcluster()
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
# Kill any running ndbcluster stuff
- ./ndb/ndbcluster --data-dir=$MYSQL_TEST_DIR/var --port-base=$NDBCLUSTER_PORT --stop
+ ./ndb/ndbcluster $NDBCLUSTER_OPTS --stop
fi
fi
}
diff --git a/mysql-test/ndb/Makefile.am b/mysql-test/ndb/Makefile.am
index 3ed222344a6..502ccee099e 100644
--- a/mysql-test/ndb/Makefile.am
+++ b/mysql-test/ndb/Makefile.am
@@ -13,6 +13,8 @@ SUFFIXES = .sh
.sh:
@RM@ -f $@ $@-t
@SED@ \
+ -e 's!@''ndb_port''@!$(ndb_port)!g' \
+ -e 's!@''ndb_port_base''@!$(ndb_port_base)!g' \
-e 's!@''ndbbindir''@!$(ndbbindir)!g' \
-e 's!@''ndbtoolsdir''@!$(ndbtoolsdir)!g' \
$< > $@-t
diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh
index f5757a11056..3486a879eec 100644
--- a/mysql-test/ndb/ndbcluster.sh
+++ b/mysql-test/ndb/ndbcluster.sh
@@ -5,7 +5,8 @@
# This scripts starts the table handler ndbcluster
# configurable parameters, make sure to change in mysqlcluterd as well
-port_base="2200"
+port=@ndb_port@
+port_base=@ndb_port_base@
fsdir=`pwd`
# end configurable parameters
@@ -84,6 +85,9 @@ while test $# -gt 0; do
--data-dir=*)
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
;;
+ --port=*)
+ port=`echo "$1" | sed -e "s;--port=;;"`
+ ;;
--port-base=*)
port_base=`echo "$1" | sed -e "s;--port-base=;;"`
;;
@@ -94,7 +98,7 @@ while test $# -gt 0; do
shift
done
-fs_ndb="$fsdir/ndbcluster-$port_base"
+fs_ndb="$fsdir/ndbcluster-$port"
NDB_HOME=
if [ ! -x "$fsdir" ]; then
@@ -120,7 +124,7 @@ exec_ndb="$exec_ndb --no-defaults"
exec_waiter="$exec_waiter --no-defaults"
ndb_host="localhost"
-ndb_mgmd_port=$port_base
+ndb_mgmd_port=$port
NDB_CONNECTSTRING="host=$ndb_host:$ndb_mgmd_port"
export NDB_CONNECTSTRING
@@ -158,10 +162,6 @@ if [ -d "$fs_ndb" ]; then :; else
exit 1
fi
-# set som help variables
-
-port_transporter=`expr $ndb_mgmd_port + 2`
-
# Start management server as deamon
# Edit file system path and ports in config file
@@ -176,7 +176,7 @@ sed \
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
- -e s,"CHOOSE_PORT_TRANSPORTER","$port_transporter",g \
+ -e s,"CHOOSE_PORT_TRANSPORTER","$port_base",g \
< ndb/ndb_config_2_node.ini \
> "$fs_ndb/config.ini"
fi