Commit 771f52b7 authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

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

into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
parents e2b1046b 92c93523
......@@ -1371,7 +1371,8 @@ sub ndbcluster_install () {
"--data-dir=$opt_vardir",
"--verbose=2",
$ndbcluster_opts,
"--initial"],
"--initial",
"--relative-config-data-dir"],
"", "", "", "") )
{
mtr_error("Error ndbcluster_install");
......@@ -1463,7 +1464,8 @@ sub ndbcluster_install_slave () {
"--verbose=2",
"--small",
"--ndbd-nodes=1",
"--initial"],
"--initial",
"--relative-config-data-dir"],
"", "", "", "") )
{
mtr_error("Error ndbcluster_install_slave");
......
......@@ -272,6 +272,7 @@ USE_NDBCLUSTER_ONLY=0
USE_RUNNING_NDBCLUSTER=""
USE_RUNNING_NDBCLUSTER_SLAVE=""
NDB_EXTRA_TEST=0
NDB_VERBOSE=0
NDBCLUSTER_EXTRA_OPTS=""
USE_PURIFY=""
PURIFY_LOGS=""
......@@ -357,6 +358,8 @@ while test $# -gt 0; do
NDBCLUSTER_EXTRA_OPTS=" "
NDB_EXTRA_TEST=1 ;
;;
--ndb-verbose)
NDB_VERBOSE=2 ;;
--ndb_mgm-extra-opts=*)
NDB_MGM_EXTRA_OPTS=`$ECHO "$1" | $SED -e "s;--ndb_mgm-extra-opts=;;"` ;;
--ndb_mgmd-extra-opts=*)
......@@ -1273,8 +1276,10 @@ start_ndbcluster()
then
NDBCLUSTER_EXTRA_OPTS="--small"
fi
OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=2 --initial"
echo "Starting master ndbcluster " $OPTS
OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=$NDB_VERBOSE --initial --relative-config-data-dir"
if [ "x$NDB_VERBOSE" != "x0" ] ; then
echo "Starting master ndbcluster " $OPTS
fi
./ndb/ndbcluster $OPTS || NDB_STATUS_OK=0
if [ x$NDB_STATUS_OK != x1 ] ; then
if [ x$FORCE != x1 ] ; then
......@@ -1504,8 +1509,10 @@ start_slave()
NDBCLUSTER_EXTRA_OPTS="--small"
fi
OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=2"
echo "Starting slave ndbcluster " $OPTS
OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=$NDB_VERBOSE --relative-config-data-dir"
if [ "x$NDB_VERBOSE" != "x0" ] ; then
echo "Starting slave ndbcluster " $OPTS
fi
./ndb/ndbcluster $OPTS \
|| NDB_SLAVE_STATUS_OK=0
# > /dev/null 2>&1 || NDB_SLAVE_STATUS_OK=0
......
......@@ -52,6 +52,7 @@ initial_ndb=
status_ndb=
ndb_diskless=0
ndbd_nodes=2
relative_config_data_dir=
ndb_no_ord=512
ndb_no_attr=2048
......@@ -99,6 +100,9 @@ while test $# -gt 0; do
--data-dir=*)
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
;;
--relative-config-data-dir)
relative_config_data_dir=1
;;
--port=*)
port=`echo "$1" | sed -e "s;--port=;;"`
;;
......@@ -196,6 +200,11 @@ fi
# Start management server as deamon
# Edit file system path and ports in config file
if [ $relative_config_data_dir ] ; then
config_fs_ndb="."
else
config_fs_ndb=$fs_ndb
fi
if [ $initial_ndb ] ; then
rm -rf $fs_ndb/ndb_* 2>&1 | cat > /dev/null
sed \
......@@ -206,7 +215,7 @@ if [ $initial_ndb ] ; then
-e s,"CHOOSE_IndexMemory","$ndb_imem",g \
-e s,"CHOOSE_Diskless","$ndb_diskless",g \
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \
-e s,"CHOOSE_FILESYSTEM","$config_fs_ndb",g \
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
-e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \
< "$config_ini" \
......
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