diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-25 21:29:59 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-25 21:29:59 +0000 |
commit | 00534590af2c4bd9b6ab5bd068f381b12676fb49 (patch) | |
tree | 815758061cb1020ce6d4708033f39540308940c2 /ndb | |
parent | 26339663b87159075a37899f05231aedefa61d2e (diff) | |
download | mariadb-git-00534590af2c4bd9b6ab5bd068f381b12676fb49.tar.gz |
moved default setting to config.ini to MgmtSrvr
only try to connect to other ndb_mgmd if connect_string explicitly given or config_file not given
ndb/src/mgmsrv/main.cpp:
moved default setting to config.ini to MgmtSrvr
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/mgmsrv/MgmtSrvr.cpp | 11 | ||||
-rw-r--r-- | ndb/src/mgmsrv/main.cpp | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 81b5eb9dfb3..986da71a8e8 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -432,15 +432,20 @@ MgmtSrvr::MgmtSrvr(SocketServer *socket_server, theFacade = 0; m_newConfig = NULL; - m_configFilename.assign(config_filename); + if (config_filename) + m_configFilename.assign(config_filename); + else + m_configFilename.assign("config.ini"); m_nextConfigGenerationNumber = 0; m_config_retriever= new ConfigRetriever(connect_string, NDB_VERSION, NDB_MGM_NODE_TYPE_MGM); - + // if connect_string explicitly given or + // no config filename is given then // first try to allocate nodeid from another management server - if(m_config_retriever->do_connect(0,0,0) == 0) + if ((connect_string || config_filename == NULL) && + (m_config_retriever->do_connect(0,0,0) == 0)) { int tmp_nodeid= 0; tmp_nodeid= m_config_retriever->allocNodeId(0 /*retry*/,0 /*delay*/); diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp index 1ab8cc0635e..400a5301a19 100644 --- a/ndb/src/mgmsrv/main.cpp +++ b/ndb/src/mgmsrv/main.cpp @@ -188,7 +188,6 @@ int main(int argc, char** argv) #endif global_mgmt_server_check = 1; - glob.config_filename= "config.ini"; const char *load_default_groups[]= { "mysql_cluster","ndb_mgmd",0 }; load_defaults("my",load_default_groups,&argc,&argv); |