diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-18 18:38:38 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-18 18:38:38 +0000 |
commit | 22b56d235427b435fd29b054c23d9fd4db8cbf0b (patch) | |
tree | a6ccb7cdbc13d7d41174cf214961175c44012134 /ndb/tools | |
parent | 55ddbd46bd4a95a99157986f3ba59fe8d2375218 (diff) | |
download | mariadb-git-22b56d235427b435fd29b054c23d9fd4db8cbf0b.tar.gz |
changed mysqladmin.c to mysqladmin.cc
no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
enabled multiple management servrs to fetch data configurations from eachother
client/Makefile.am:
changed mysqladmin.c to mysqladmin.cc
client/mysqladmin.cc:
changed mysqladmin.c to mysqladmin.cc
configure.in:
no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore
ndb/include/mgmapi/mgmapi.h:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/include/mgmcommon/ConfigRetriever.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/include/ndbapi/ndb_cluster_connection.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/kernel/main.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/kernel/vm/Configuration.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays
ndb/src/kernel/vm/Configuration.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmapi/LocalConfig.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmapi/LocalConfig.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmapi/mgmapi.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmclient/CommandInterpreter.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmclient/main.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmclient/ndb_mgmclient.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmclient/ndb_mgmclient.h:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmsrv/MgmtSrvr.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
enabled multiple management servrs to fetch data configurations from eachother
ndb/src/mgmsrv/MgmtSrvr.hpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmsrv/MgmtSrvrConfig.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/mgmsrv/main.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/src/ndbapi/ndb_cluster_connection.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
ndb/tools/waiter.cpp:
aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes
removed all dependencies of LocalConfig, except for mgmapi internals
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/waiter.cpp | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp index e24164ea807..cb694ae5877 100644 --- a/ndb/tools/waiter.cpp +++ b/ndb/tools/waiter.cpp @@ -23,7 +23,6 @@ #include <NdbOut.hpp> #include <NdbSleep.h> #include <kernel/ndb_limits.h> -#include <LocalConfig.hpp> #include <NDBT.hpp> @@ -85,39 +84,8 @@ int main(int argc, char** argv){ char buf[255]; _hostName = argv[0]; - if (_hostName == NULL){ - LocalConfig lcfg; - if(!lcfg.init(opt_connect_str, 0)) - { - lcfg.printError(); - lcfg.printUsage(); - g_err << "Error parsing local config file" << endl; - return NDBT_ProgramExit(NDBT_FAILED); - } - - for (unsigned i = 0; i<lcfg.ids.size();i++) - { - MgmtSrvrId * m = &lcfg.ids[i]; - - switch(m->type){ - case MgmId_TCP: - snprintf(buf, 255, "%s:%d", m->name.c_str(), m->port); - _hostName = buf; - break; - case MgmId_File: - break; - default: - break; - } - if (_hostName != NULL) - break; - } - if (_hostName == NULL) - { - g_err << "No management servers configured in local config file" << endl; - return NDBT_ProgramExit(NDBT_FAILED); - } - } + if (_hostName == 0) + _hostName= opt_connect_str; if (_no_contact) { if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_NO_CONTACT, _timeout) != 0) @@ -210,13 +178,19 @@ waitClusterStatus(const char* _addr, int _nodes[MAX_NDB_NODES]; int _num_nodes = 0; - handle = ndb_mgm_create_handle(); + handle = ndb_mgm_create_handle(); if (handle == NULL){ g_err << "handle == NULL" << endl; return -1; } g_info << "Connecting to mgmsrv at " << _addr << endl; - if (ndb_mgm_connect(handle, _addr) == -1) { + if (ndb_mgm_set_connectstring(handle, _addr)) + { + MGMERR(handle); + g_err << "Connectstring " << _addr << " invalid" << endl; + return -1; + } + if (ndb_mgm_connect(handle,0,0,1)) { MGMERR(handle); g_err << "Connection to " << _addr << " failed" << endl; return -1; |