Commit 7041c694 authored by unknown's avatar unknown

Bug #17230 Can't change character-sets-dir for ndbd

parent 86631808
...@@ -1457,7 +1457,8 @@ sub ndbcluster_start ($) { ...@@ -1457,7 +1457,8 @@ sub ndbcluster_start ($) {
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null # FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster", if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
["--port=$opt_ndbcluster_port", ["--port=$opt_ndbcluster_port",
"--data-dir=$opt_vardir"], "--data-dir=$opt_vardir",
"--character-sets-dir=$path_charsetsdir"],
"", "/dev/null", "", "") ) "", "/dev/null", "", "") )
{ {
mtr_error("Error ndbcluster_start"); mtr_error("Error ndbcluster_start");
......
...@@ -1241,7 +1241,7 @@ start_ndbcluster() ...@@ -1241,7 +1241,7 @@ start_ndbcluster()
else else
NDBCLUSTER_EXTRA_OPTS="--small" NDBCLUSTER_EXTRA_OPTS="--small"
fi fi
./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0 ./ndb/ndbcluster $NDBCLUSTER_OPTS --character-sets-dir=$CHARSETSDIR $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0
if [ x$NDB_STATUS_OK != x1 ] ; then if [ x$NDB_STATUS_OK != x1 ] ; then
if [ x$FORCE != x1 ] ; then if [ x$FORCE != x1 ] ; then
exit 1 exit 1
......
...@@ -60,6 +60,7 @@ ndb_imem=24M ...@@ -60,6 +60,7 @@ ndb_imem=24M
NDB_MGM_EXTRA_OPTS= NDB_MGM_EXTRA_OPTS=
NDB_MGMD_EXTRA_OPTS= NDB_MGMD_EXTRA_OPTS=
NDBD_EXTRA_OPTS= NDBD_EXTRA_OPTS=
CHARSETSDIR=
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
...@@ -106,6 +107,9 @@ while test $# -gt 0; do ...@@ -106,6 +107,9 @@ while test $# -gt 0; do
--ndbd-extra-opts=*) --ndbd-extra-opts=*)
NDBD_EXTRA_OPTS=`echo "$1" | sed -e "s;--ndbd-extra-opts=;;"` NDBD_EXTRA_OPTS=`echo "$1" | sed -e "s;--ndbd-extra-opts=;;"`
;; ;;
--character-sets-dir=*)
CHARSETSDIR=`echo "$1" | sed -e "s;--character-sets-dir=;;"`
;;
-- ) shift; break ;; -- ) shift; break ;;
--* ) $ECHO "Unrecognized option: $1"; exit 1 ;; --* ) $ECHO "Unrecognized option: $1"; exit 1 ;;
* ) break ;; * ) break ;;
...@@ -135,7 +139,7 @@ fi ...@@ -135,7 +139,7 @@ fi
exec_mgmtclient="$exec_mgmtclient --no-defaults $NDB_MGM_EXTRA_OPTS" exec_mgmtclient="$exec_mgmtclient --no-defaults $NDB_MGM_EXTRA_OPTS"
exec_mgmtsrvr="$exec_mgmtsrvr --no-defaults $NDB_MGMD_EXTRA_OPTS" exec_mgmtsrvr="$exec_mgmtsrvr --no-defaults $NDB_MGMD_EXTRA_OPTS"
exec_ndb="$exec_ndb --no-defaults $NDBD_EXTRA_OPTS" exec_ndb="$exec_ndb --no-defaults $NDBD_EXTRA_OPTS --character-sets-dir=$CHARSETSDIR"
exec_waiter="$exec_waiter --no-defaults" exec_waiter="$exec_waiter --no-defaults"
ndb_host="localhost" ndb_host="localhost"
......
...@@ -84,7 +84,10 @@ const char *opt_debug= 0; ...@@ -84,7 +84,10 @@ const char *opt_debug= 0;
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "core-file", OPT_WANT_CORE, "Write core on errors.",\ { "core-file", OPT_WANT_CORE, "Write core on errors.",\
(gptr*) &opt_core, (gptr*) &opt_core, 0,\ (gptr*) &opt_core, (gptr*) &opt_core, 0,\
GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0} GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0},\
{"character-sets-dir", OPT_CHARSETS_DIR,\
"Directory where character sets are.", (gptr*) &charsets_dir,\
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}\
#ifndef DBUG_OFF #ifndef DBUG_OFF
#define NDB_STD_OPTS(prog_name) \ #define NDB_STD_OPTS(prog_name) \
...@@ -111,6 +114,7 @@ enum ndb_std_options { ...@@ -111,6 +114,7 @@ enum ndb_std_options {
OPT_WANT_CORE, OPT_WANT_CORE,
OPT_NDB_MGMD, OPT_NDB_MGMD,
OPT_NDB_NODEID, OPT_NDB_NODEID,
OPT_CHARSETS_DIR,
NDB_STD_OPTIONS_LAST /* should always be last in this enum */ NDB_STD_OPTIONS_LAST /* should always be last in this enum */
}; };
......
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