List:Commits« Previous MessageNext Message »
From:gni Date:August 15 2006 5:18am
Subject:bk commit into 5.0 tree (gni:1.2246) BUG#19873
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of root. When root does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-15 11:16:12+08:00, gni@dev3-127.(none) +1 -0
  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@stripped, 2006-08-15 11:16:11+08:00,
gni@dev3-127.(none) +9 -1
    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.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gni
# Host:	dev3-127.(none)
# Root:	/mnt/mysql/home/ngb/bug19873

--- 1.63/ndb/src/mgmclient/CommandInterpreter.cpp	2006-08-15 11:17:16 +08:00
+++ 1.64/ndb/src/mgmclient/CommandInterpreter.cpp	2006-08-15 11:17:16 +08:00
@@ -704,6 +704,12 @@
   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,9 +1320,11 @@
 void
 CommandInterpreter::executeConnect(char* parameters) 
 {
+  BaseString *basestring;
   disconnect();
   if (!emptyString(parameters)) {
-    m_constr= BaseString(parameters).trim().c_str();
+    basestring= new BaseString(parameters);
+    m_constr= basestring->trim().c_str();
   }
   connect();
 }
Thread
bk commit into 5.0 tree (gni:1.2246) BUG#19873gni15 Aug