Commit 3e779698 authored by unknown's avatar unknown
Browse files

aligned connect string option on all cluster executables, --ndb-connectstring...

aligned connect string option on all cluster executables, --ndb-connectstring is now supported by all
enabled new section in my.cnf [mysql_cluster], which is read by all executables, where connect string can be put for all cluster executables


parent 5a7198f5
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -32,10 +32,13 @@
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
  { "version", 'V', "Output version information and exit.", 0, 0, 0, \
    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
  { "connect-string", 'c', \
  { "ndb-connectstring", 'c', \
    "Set connect string for connecting to ndb_mgmd. " \
    "<constr>=\"host=<hostname:port>[;nodeid=<id>]\". " \
    "Overides specifying entries in NDB_CONNECTSTRING and config file", \
    "Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
    "Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
  { "connect-string", 'c', "same as --ndb-connectstring",\
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
#else
@@ -46,10 +49,13 @@
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
  { "version", 'V', "Output version information and exit.", 0, 0, 0, \
    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
  { "connect-string", 'c', \
  { "ndb-connectstring", 'c', \
    "Set connect string for connecting to ndb_mgmd. " \
    "<constr>=\"host=<hostname:port>[;nodeid=<id>]\". " \
    "Overides specifying entries in NDB_CONNECTSTRING and config file", \
    "Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
    "Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
  { "connect-string", 'c', "same as --ndb-connectstring",\
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0,\
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
#endif
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
bool
Configuration::init(int argc, char** argv)
{  
  const char *load_default_groups[]= { "ndbd",0 };
  const char *load_default_groups[]= { "mysql_cluster","ndbd",0 };
  load_defaults("my",load_default_groups,&argc,&argv);

  int ho_error;
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ int main(int argc, char** argv){
  NDB_INIT(argv[0]);
  const char *_host = 0;
  int _port = 0;
  const char *load_default_groups[]= { "ndb_mgm",0 };
  const char *load_default_groups[]= { "mysql_cluster","ndb_mgm",0 };

  load_defaults("my",load_default_groups,&argc,&argv);
  int ho_error;
+8 −4
Original line number Diff line number Diff line
@@ -110,10 +110,14 @@ static struct my_option my_long_options[] =
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
  { "version", 'V', "Output version information and exit.", 0, 0, 0,
    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
  { "connect-string", 1023,
  { "ndb-connectstring", 1023,
    "Set connect string for connecting to ndb_mgmd. "
    "<constr>=\"host=<hostname:port>[;nodeid=<id>]\". "
    "Overides specifying entries in NDB_CONNECTSTRING and config file",
    "Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " 
    "Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg",
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
  { "connect-string", 1023,
    "same as --ndb-connectstring.",
    (gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
  { "config-file", 'f', "Specify cluster configuration file",
@@ -196,7 +200,7 @@ int main(int argc, char** argv)
  global_mgmt_server_check = 1;
  glob.config_filename= "config.ini";

  const char *load_default_groups[]= { "ndb_mgmd",0 };
  const char *load_default_groups[]= { "mysql_cluster","ndb_mgmd",0 };
  load_defaults("my",load_default_groups,&argc,&argv);

  int ho_error;
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),

int main(int argc, char** argv){
  NDB_INIT(argv[0]);
  const char *load_default_groups[]= { "ndb_tools",0 };
  const char *load_default_groups[]= { "mysql_cluster",0 };
  load_defaults("my",load_default_groups,&argc,&argv);
  int ho_error;
  if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
Loading