Commit 8131326e authored by unknown's avatar unknown

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.bredbandsbolaget.se:/home/tomas/mysql-4.1-clean
parents e4690cf7 36b785bb
......@@ -202,6 +202,7 @@ MASTER_MYPORT=9306
SLAVE_RUNNING=0
SLAVE_MYPORT=9307
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
NDBCLUSTER_PORT=9350
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
MYSQL_MANAGER_USER=root
......@@ -258,6 +259,7 @@ while test $# -gt 0; do
--master_port=*) MASTER_MYPORT=`$ECHO "$1" | $SED -e "s;--master_port=;;"` ;;
--slave_port=*) SLAVE_MYPORT=`$ECHO "$1" | $SED -e "s;--slave_port=;;"` ;;
--manager-port=*) MYSQL_MANAGER_PORT=`$ECHO "$1" | $SED -e "s;--manager_port=;;"` ;;
--ndbcluster_port=*) NDBCLUSTER_PORT=`$ECHO "$1" | $SED -e "s;--ndbcluster_port=;;"` ;;
--with-openssl)
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT \
--ssl-ca=$BASEDIR/SSL/cacert.pem \
......@@ -1426,7 +1428,7 @@ then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
# Kill any running ndbcluster stuff
./ndb/ndbcluster --stop
./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --stop
fi
fi
......@@ -1447,7 +1449,7 @@ then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
echo "Starting ndbcluster"
./ndb/ndbcluster --small --discless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --discless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
export NDB_CONNECTSTRING=`cat Ndb.cfg`
else
export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
......@@ -1547,7 +1549,7 @@ then
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
# Kill any running ndbcluster stuff
./ndb/ndbcluster --stop
./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --stop
fi
fi
......
......@@ -43,9 +43,7 @@ HostName: CHOOSE_HOSTNAME_7
[MGM]
Id: 1
ExecuteOnComputer: 1
PortNumber: CHOOSE_PORT_BASE00
PortNumberStats: CHOOSE_PORT_BASE01
PortNumber: CHOOSE_PORT_MGM
[DB]
Id: 2
......@@ -74,4 +72,4 @@ Id: 14
ExecuteOnComputer: 7
[TCP DEFAULT]
PortNumber: CHOOSE_PORT_BASE02
PortNumber: CHOOSE_PORT_TRANSPORTER
......@@ -5,7 +5,7 @@
# This scripts starts the table handler ndbcluster
# configurable parameters, make sure to change in mysqlcluterd as well
port_base="22" # using ports port_base{"00","01", etc}
port_base="2200"
fsdir=`pwd`
# end configurable parameters
......@@ -85,8 +85,8 @@ fs_ndb=$fsdir/ndbcluster
fs_mgm_1=$fs_ndb/1.ndb_mgm
fs_ndb_2=$fs_ndb/2.ndb_db
fs_ndb_3=$fs_ndb/3.ndb_db
fs_name_2=$fs_ndb/node-2-fs
fs_name_3=$fs_ndb/node-3-fs
fs_name_2=$fs_ndb/node-2-fs-$port_base
fs_name_3=$fs_ndb/node-3-fs-$port_base
NDB_HOME=
export NDB_CONNECTSTRING
......@@ -125,8 +125,9 @@ fi
# set som help variables
ndb_host="localhost"
ndb_port=$port_base"00"
NDB_CONNECTSTRING_BASE="host=$ndb_host:$ndb_port;nodeid="
ndb_mgmd_port=$port_base
port_transporter=`expr $ndb_mgmd_port + 2`
NDB_CONNECTSTRING_BASE="host=$ndb_host:$ndb_mgmd_port;nodeid="
# Start management server as deamon
......@@ -145,7 +146,8 @@ sed \
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM_NODE_2","$fs_name_2",g \
-e s,"CHOOSE_FILESYSTEM_NODE_3","$fs_name_3",g \
-e s,"CHOOSE_PORT_BASE",$port_base,g \
-e s,"CHOOSE_PORT_MGM",$ndb_mgmd_port,g \
-e s,"CHOOSE_PORT_TRANSPORTER",$port_transporter,g \
< ndb/ndb_config_2_node.ini \
> "$fs_mgm_1/config.ini"
fi
......@@ -195,7 +197,7 @@ status_ndbcluster
status_ndbcluster() {
# Start management client
echo "show" | $exec_mgmtclient $ndb_host $ndb_port
echo "show" | $exec_mgmtclient $ndb_host $ndb_mgmd_port
}
stop_default_ndbcluster() {
......@@ -210,11 +212,11 @@ if [ ! -f $cfgfile ] ; then
fi
ndb_host=`cat $cfgfile | sed -e "s,.*host=\(.*\)\:.*,\1,1"`
ndb_port=`cat $cfgfile | sed -e "s,.*host=$ndb_host\:\([0-9]*\).*,\1,1"`
ndb_mgmd_port=`cat $cfgfile | sed -e "s,.*host=$ndb_host\:\([0-9]*\).*,\1,1"`
# Start management client
exec_mgmtclient="$exec_mgmtclient --try-reconnect=1 $ndb_host $ndb_port"
exec_mgmtclient="$exec_mgmtclient --try-reconnect=1 $ndb_host $ndb_mgmd_port"
echo "$exec_mgmtclient"
echo "all stop" | $exec_mgmtclient
......
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