MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:February 14 2007 4:35am
Subject:bk commit into 5.0 tree (stewart:1.2408) BUG#26353
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart 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, 2007-02-14 15:35:29+11:00, stewart@willster.(none) +2 -0
  BUG#26353 remove GET_CONFIG_BACKWARDS_COMPAT from ndb_mgmd
  
  there is backwards compatibility for GET CONFIG style configuration requests in
  ndb_mgmd. None of the ndbd versions that use this couldn't possibly connect to a
  5.0 or 5.1 cluster. remove the backwards compat
  
  remove it

  ndb/src/mgmsrv/Services.cpp@stripped, 2007-02-14 15:35:27+11:00, stewart@willster.(none) +3 -83
    remove MGM_GET_CONFIG_BACKWARDS_COMPAT code.
    
    any client using GET CONFIG will just not work with modern NDB.

  ndb/src/mgmsrv/Services.hpp@stripped, 2007-02-14 15:35:27+11:00, stewart@willster.(none) +0 -9
    remove GET CONFIG support

# 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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/5.0/ndb-work

--- 1.73/ndb/src/mgmsrv/Services.cpp	2006-12-24 06:04:17 +11:00
+++ 1.74/ndb/src/mgmsrv/Services.cpp	2007-02-14 15:35:27 +11:00
@@ -332,19 +332,6 @@
 
     switch(ctx.m_status) {
     case Parser_t::UnknownCommand:
-#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
-      /* Backwards compatibility for old NDBs that still use
-       * the old "GET CONFIG" command.
-       */
-	  size_t i;
-      for(i=0; i<strlen(ctx.m_currentToken); i++)
-	ctx.m_currentToken[i] = toupper(ctx.m_currentToken[i]);
-
-      if(strncmp("GET CONFIG ", 
-		 ctx.m_currentToken,
-		 strlen("GET CONFIG ")) == 0)
-	getConfig_old(ctx);
-#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
       break;
     default:
       break;
@@ -359,32 +346,6 @@
   DBUG_VOID_RETURN;
 }
 
-#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
-void
-MgmApiSession::getConfig_old(Parser_t::Context &ctx) {
-  Properties args;
-
-  Uint32 version, node;
-
-  if(sscanf(ctx.m_currentToken, "GET CONFIG %d %d",
-	    (int *)&version, (int *)&node) != 2) {
-    m_output->println("Expected 2 arguments for GET CONFIG");
-    return;
-  }
-
-  /* Put arguments in properties object so we can call the real function */  
-  args.put("version", version);
-  args.put("node", node);
-  getConfig_common(ctx, args, true);
-}
-#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
-
-void
-MgmApiSession::getConfig(Parser_t::Context &ctx, 
-			 const class Properties &args) {
-  getConfig_common(ctx, args);
-}
-
 static Properties *
 backward(const char * base, const Properties* reply){
   Properties * ret = new Properties();
@@ -560,9 +521,9 @@
 }
 
 void
-MgmApiSession::getConfig_common(Parser_t::Context &,
-				const class Properties &args,
-				bool compat) {
+MgmApiSession::getConfig(Parser_t::Context &,
+                         const class Properties &args)
+{
   Uint32 version, node = 0;
 
   args.get("version", &version);
@@ -573,47 +534,6 @@
     m_output->println("get config reply");
     m_output->println("result: Could not fetch configuration");
     m_output->println("");
-    return;
-  }
-
-  if(version > 0 && version < makeVersion(3, 5, 0) && compat){
-    Properties *reply = backward("", conf->m_oldConfig);
-    reply->put("Version", version);
-    reply->put("LocalNodeId", node);
-
-    backward("", reply);
-    //reply->print();
-    
-    const Uint32 size = reply->getPackedSize();
-    Uint32 *buffer = new Uint32[size/4+1];
-    
-    reply->pack(buffer);
-    delete reply;
-    
-    const int uurows = (size + 44)/45;
-    char * uubuf = new char[uurows * 62+5];
-      
-    const int uusz = uuencode_mem(uubuf, (char *)buffer, size);
-    delete[] buffer;
-      
-    m_output->println("GET CONFIG %d %d %d %d %d",
-		      0, version, node, size, uusz);
-    
-    m_output->println("begin 664 Ndb_cfg.bin");
-      
-    /* XXX Need to write directly to the socket, because the uubuf is not
-     * NUL-terminated. This could/should probably be done in a nicer way.
-     */
-    write_socket(m_socket, MAX_WRITE_TIMEOUT, uubuf, uusz);
-    delete[] uubuf;
-      
-    m_output->println("end");
-    m_output->println("");
-    return;
-  }
-
-  if(compat){
-    m_output->println("GET CONFIG %d %d %d %d %d",1, version, 0, 0, 0);
     return;
   }
 

--- 1.22/ndb/src/mgmsrv/Services.hpp	2006-12-24 06:04:17 +11:00
+++ 1.23/ndb/src/mgmsrv/Services.hpp	2007-02-14 15:35:27 +11:00
@@ -24,9 +24,6 @@
 
 #include "MgmtSrvr.hpp"
 
-/** Undefine this to remove backwards compatibility for "GET CONFIG". */
-#define MGM_GET_CONFIG_BACKWARDS_COMPAT
-
 class MgmApiSession : public SocketServer::Session
 {
   static void stop_session_if_timed_out(SocketServer::Session *_s, void *data);
@@ -42,9 +39,6 @@
   char m_err_str[1024];
   int m_stopSelf; // -1 is restart, 0 do nothing, 1 stop
 
-  void getConfig_common(Parser_t::Context &ctx,
-			const class Properties &args,
-			bool compat = false);
   const char *get_error_text(int err_no)
   { return m_mgmsrv.getErrorText(err_no, m_err_str, sizeof(m_err_str)); }
 
@@ -55,9 +49,6 @@
 
   void getStatPort(Parser_t::Context &ctx, const class Properties &args);
   void getConfig(Parser_t::Context &ctx, const class Properties &args);
-#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
-  void getConfig_old(Parser_t::Context &ctx);
-#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
 
   void get_nodeid(Parser_t::Context &ctx, const class Properties &args);
   void getVersion(Parser_t::Context &ctx, const class Properties &args);
Thread
bk commit into 5.0 tree (stewart:1.2408) BUG#26353Stewart Smith14 Feb