Commit 25968b7b authored by unknown's avatar unknown

BUG#19873 Merge dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.0-ndb-bj

into  dev3-127.(none):/mnt/mysql/home/ngb/bug19873


ndb/src/mgmclient/CommandInterpreter.cpp:
  ndb_mgm can automatically reconnect to the ndb_mgmd after ndb_mgmd restarted.
  and this commit fixes probable mem leak
parents fd1b3e91 3cca8f5b
......@@ -1028,6 +1028,12 @@ CommandInterpreter::execute_impl(const char *_line, bool interactive)
if (!connect(interactive))
DBUG_RETURN(true);
if (ndb_mgm_check_connection(m_mgmsrv))
{
disconnect();
connect();
}
if (strcasecmp(firstToken, "SHOW") == 0) {
Guard g(m_print_mutex);
executeShow(allAfterFirstToken);
......@@ -1640,11 +1646,16 @@ CommandInterpreter::executeShow(char* parameters)
void
CommandInterpreter::executeConnect(char* parameters, bool interactive)
{
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(interactive);
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