Commit 3cca8f5b authored by unknown's avatar unknown

BUG#19873 Running any command in ndb_mgm can automatically reconnect the...

BUG#19873 Running any command in ndb_mgm can automatically reconnect the server after restarting the ndb_mgmd.
          connect command in the ndb_mgm can connect or reconnect the management server successfully


ndb/src/mgmclient/CommandInterpreter.cpp:
  1.After restarting the ndb_mgmd, running any command in ndb_mgm will automatically reconnect the server firstly.
  2.The connect command in the ndb_mgm can connect or reconnect the management server successfully.
parent 1bd553d4
......@@ -704,6 +704,12 @@ CommandInterpreter::execute_impl(const char *_line)
if (!connect())
DBUG_RETURN(true);
if (ndb_mgm_check_connection(m_mgmsrv))
{
disconnect();
connect();
}
if (strcasecmp(firstToken, "SHOW") == 0) {
Guard g(m_print_mutex);
executeShow(allAfterFirstToken);
......@@ -1314,11 +1320,16 @@ CommandInterpreter::executeShow(char* parameters)
void
CommandInterpreter::executeConnect(char* parameters)
{
BaseString *basestring = NULL;
disconnect();
if (!emptyString(parameters)) {
m_constr= BaseString(parameters).trim().c_str();
basestring= new BaseString(parameters);
m_constr= basestring->trim().c_str();
}
connect();
if (basestring != NULL)
delete basestring;
}
//*****************************************************************************
......
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