List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:January 23 2007 2:34pm
Subject:bk commit into 5.1 tree (stewart:1.2399)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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-01-24 00:34:12+11:00, stewart@willster.(none) +5 -0
  Merge willster.(none):/home/stewart/Documents/MySQL/5.0/bug25487
  into  willster.(none):/home/stewart/Documents/MySQL/5.1/bug25567
  MERGE: 1.1810.2455.12

  storage/ndb/include/mgmapi/mgmapi.h@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Auto merged
    MERGE: 1.42.16.2

  storage/ndb/include/mgmapi/mgmapi.h@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Merge rename: ndb/include/mgmapi/mgmapi.h -> storage/ndb/include/mgmapi/mgmapi.h

  storage/ndb/include/util/SocketClient.hpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Auto merged
    MERGE: 1.4.3.2

  storage/ndb/include/util/SocketClient.hpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Merge rename: ndb/include/util/SocketClient.hpp ->
storage/ndb/include/util/SocketClient.hpp

  storage/ndb/src/common/transporter/Transporter.cpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Auto merged
    MERGE: 1.18.7.3

  storage/ndb/src/common/transporter/Transporter.cpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Merge rename: ndb/src/common/transporter/Transporter.cpp ->
storage/ndb/src/common/transporter/Transporter.cpp

  storage/ndb/src/common/util/SocketClient.cpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Auto merged
    MERGE: 1.6.5.2

  storage/ndb/src/common/util/SocketClient.cpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Merge rename: ndb/src/common/util/SocketClient.cpp ->
storage/ndb/src/common/util/SocketClient.cpp

  storage/ndb/src/mgmapi/mgmapi.cpp@stripped, 2007-01-24 00:34:07+11:00,
stewart@willster.(none) +0 -0
    Auto merged
    MERGE: 1.44.33.2

  storage/ndb/src/mgmapi/mgmapi.cpp@stripped, 2007-01-24 00:34:06+11:00,
stewart@willster.(none) +0 -0
    Merge rename: ndb/src/mgmapi/mgmapi.cpp -> storage/ndb/src/mgmapi/mgmapi.cpp

# 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.1/bug25567/RESYNC

--- 1.42.16.1/ndb/include/mgmapi/mgmapi.h	2007-01-23 17:06:24 +11:00
+++ 1.61/storage/ndb/include/mgmapi/mgmapi.h	2007-01-24 00:34:06 +11:00
@@ -16,6 +16,11 @@
 #ifndef MGMAPI_H
 #define MGMAPI_H
 
+#include "mgmapi_config_parameters.h"
+#include "ndb_logevent.h"
+
+#define MGM_LOGLEVELS CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1
+
 /**
  * @mainpage MySQL Cluster Management API
  *
@@ -170,7 +175,6 @@
     = NODE_TYPE_MGM
 #endif
 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
-    ,NDB_MGM_NODE_TYPE_REP = NODE_TYPE_REP  /** A replication node */
     ,NDB_MGM_NODE_TYPE_MIN     = 0          /** Min valid value*/
     ,NDB_MGM_NODE_TYPE_MAX     = 3          /** Max valid value*/
 #endif
@@ -853,6 +857,30 @@
    *
    * @param   handle        NDB management handle
    *
+   * @param loglevel        A vector of seven (NDB_MGM_EVENT_SEVERITY_ALL)
+   *                        elements of struct ndb_mgm_severity,
+   *                        where each element contains
+   *                        1 if a severity indicator is enabled and 0 if not.
+   *                        A severity level is stored at position
+   *                        ndb_mgm_clusterlog_level;
+   *                        for example the "error" level is stored in position
+   *                        [NDB_MGM_EVENT_SEVERITY_ERROR].
+   *                        The first element [NDB_MGM_EVENT_SEVERITY_ON] in 
+   *                        the vector signals whether the cluster log
+   *                        is disabled or enabled.
+   * @param severity_size   The size of the vector (NDB_MGM_EVENT_SEVERITY_ALL)
+   * @return                Number of returned severities or -1 on error
+   */
+  int ndb_mgm_get_clusterlog_severity_filter(NdbMgmHandle handle,
+					     struct ndb_mgm_severity* severity,
+					     unsigned int severity_size);
+
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  /**
+   * Get clusterlog severity filter
+   *
+   * @param   handle        NDB management handle
+   *
    * @return                A vector of seven elements,
    *                        where each element contains
    *                        1 if a severity indicator is enabled and 0 if not.
@@ -865,7 +893,8 @@
    *                        whether the cluster log
    *                        is disabled or enabled.
    */
-  const unsigned int *ndb_mgm_get_clusterlog_severity_filter(NdbMgmHandle handle);
+  const unsigned int *ndb_mgm_get_clusterlog_severity_filter_old(NdbMgmHandle handle);
+#endif
 
   /**
    * Set log category and levels for the cluster log
@@ -882,6 +911,23 @@
 				      enum ndb_mgm_event_category category,
 				      int level,
 				      struct ndb_mgm_reply* reply);
+  
+  /**
+   * get log category and levels 
+   *
+   * @param   handle        NDB management handle.
+   * @param loglevel        A vector of twelve (MGM_LOGLEVELS) elements
+   *                        of struct ndb_mgm_loglevel, 
+   *                        where each element contains
+   *                        loglevel of corresponding category
+   * @param loglevel_size   The size of the vector (MGM_LOGLEVELS)
+   * @return                Number of returned loglevels or -1 on error
+   */
+  int ndb_mgm_get_clusterlog_loglevel(NdbMgmHandle handle,
+				      struct ndb_mgm_loglevel* loglevel,
+				      unsigned int loglevel_size);
+
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
   /**
    * get log category and levels 
    *
@@ -890,7 +936,9 @@
    *                        where each element contains
    *                        loglevel of corresponding category
    */
-  const unsigned int *ndb_mgm_get_clusterlog_loglevel(NdbMgmHandle handle);
+  const unsigned int *ndb_mgm_get_clusterlog_loglevel_old(NdbMgmHandle handle);
+#endif
+
 
   /** @} *********************************************************************/
   /**
@@ -926,16 +974,6 @@
 				enum ndb_mgm_event_category category,
 				int level,
 				struct ndb_mgm_reply* reply);
-
-  /**
-   * Returns the port number where statistics information is sent
-   *
-   * @param   handle        NDB management handle.
-   * @param   reply         Reply message.
-   * @return                -1 on error.
-   */
-  int ndb_mgm_get_stat_port(NdbMgmHandle handle,
-			    struct ndb_mgm_reply* reply);
 #endif
 
   /**
@@ -1153,6 +1191,14 @@
   int ndb_mgm_check_connection(NdbMgmHandle handle);
 
   int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length);
+
+  struct ndb_mgm_param_info
+  {
+    Uint32 m_id;
+    const char * m_name;
+  };
+  int ndb_mgm_get_db_parameter_info(Uint32 paramId, struct ndb_mgm_param_info * info, 
+             size_t * size);
 #endif
 
 #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
@@ -1173,10 +1219,14 @@
 				int e, struct ndb_mgm_reply* r)
   { return ndb_mgm_set_clusterlog_severity_filter(h,(ndb_mgm_event_severity)s,
 						  e,r); }
-
+  struct ndb_mgm_severity {
+    enum ndb_mgm_event_severity category;
+    unsigned int value;
+  };
+  
   inline
-  const unsigned int *ndb_mgm_get_logfilter(NdbMgmHandle h)
-  { return ndb_mgm_get_clusterlog_severity_filter(h); }
+  const unsigned int * ndb_mgm_get_logfilter(NdbMgmHandle h)
+  { return ndb_mgm_get_clusterlog_severity_filter_old(h); }
 
   inline
   int ndb_mgm_set_loglevel_clusterlog(NdbMgmHandle h, int n,
@@ -1184,9 +1234,14 @@
 				      int l, struct ndb_mgm_reply* r)
   { return ndb_mgm_set_clusterlog_loglevel(h,n,c,l,r); }
 
+  struct ndb_mgm_loglevel {
+    enum ndb_mgm_event_category category;
+    unsigned int value;
+  };
+
   inline
-  const unsigned int *ndb_mgm_get_loglevel_clusterlog(NdbMgmHandle h)
-  { return ndb_mgm_get_clusterlog_loglevel(h); }
+  const unsigned int * ndb_mgm_get_loglevel_clusterlog(NdbMgmHandle h)
+  { return ndb_mgm_get_clusterlog_loglevel_old(h); }
 
 #endif
 

--- 1.44.33.1/ndb/src/mgmapi/mgmapi.cpp	2007-01-23 17:06:33 +11:00
+++ 1.83/storage/ndb/src/mgmapi/mgmapi.cpp	2007-01-24 00:34:07 +11:00
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 MySQL AB
+ /* Copyright (C) 2003 MySQL AB
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -143,6 +143,12 @@
     return ret; \
   }
 
+#define DBUG_CHECK_REPLY(reply, ret) \
+  if (reply == NULL) { \
+    SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_REPLY, ""); \
+    DBUG_RETURN(ret);                                    \
+  }
+
 /*****************************************************************************
  * Handles
  *****************************************************************************/
@@ -179,7 +185,7 @@
   h->mgmd_version_minor= -1;
   h->mgmd_version_build= -1;
 
-  DBUG_PRINT("info", ("handle: 0x%lx", (long)h));
+  DBUG_PRINT("info", ("handle: 0x%lx", (long) h));
   DBUG_RETURN(h);
 }
 
@@ -196,7 +202,7 @@
 ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
 {
   DBUG_ENTER("ndb_mgm_set_connectstring");
-  DBUG_PRINT("info", ("handle: 0x%lx", (long)handle));
+  DBUG_PRINT("info", ("handle: 0x%lx", (long) handle));
   handle->cfg.~LocalConfig();
   new (&(handle->cfg)) LocalConfig;
   if (!handle->cfg.init(mgmsrv, 0) ||
@@ -205,7 +211,7 @@
     handle->cfg.~LocalConfig();
     new (&(handle->cfg)) LocalConfig;
     handle->cfg.init(0, 0); /* reset the LocalConfig */
-    SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
+    SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, mgmsrv ? mgmsrv : "");
     DBUG_RETURN(-1);
   }
   handle->cfg_i= -1;
@@ -238,7 +244,7 @@
   DBUG_ENTER("ndb_mgm_destroy_handle");
   if(!handle)
     DBUG_VOID_RETURN;
-  DBUG_PRINT("info", ("handle: 0x%lx", (long)(* handle)));
+  DBUG_PRINT("info", ("handle: 0x%lx", (long) (* handle)));
   /**
    * important! only disconnect if connected
    * other code relies on this
@@ -1264,8 +1270,39 @@
 }
 
 extern "C"
+int
+ndb_mgm_get_clusterlog_severity_filter(NdbMgmHandle handle, 
+				       struct ndb_mgm_severity* severity,
+				       unsigned int severity_size) 
+{
+  SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing:
ndb_mgm_get_clusterlog_severity_filter");
+  const ParserRow<ParserDummy> getinfo_reply[] = {
+    MGM_CMD("clusterlog", NULL, ""),
+    MGM_ARG(clusterlog_severity_names[0], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[1], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[2], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[3], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[4], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[5], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_severity_names[6], Int, Mandatory, ""),
+  };
+  CHECK_HANDLE(handle, -1);
+  CHECK_CONNECTED(handle, -1);
+
+  Properties args;
+  const Properties *reply;
+  reply = ndb_mgm_call(handle, getinfo_reply, "get info clusterlog", &args);
+  CHECK_REPLY(reply, -1);
+  
+  for(unsigned int i=0; i < severity_size; i++) {
+    reply->get(clusterlog_severity_names[severity[i].category],
&severity[i].value);
+  }
+  return severity_size;
+}
+
+extern "C"
 const unsigned int *
-ndb_mgm_get_clusterlog_severity_filter(NdbMgmHandle handle) 
+ndb_mgm_get_clusterlog_severity_filter_old(NdbMgmHandle handle) 
 {
   SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing:
ndb_mgm_get_clusterlog_severity_filter");
   static unsigned int enabled[(int)NDB_MGM_EVENT_SEVERITY_ALL]=
@@ -1384,8 +1421,45 @@
   { "startup", "shutdown", "statistics", "checkpoint", "noderestart", "connection",
"info", "warning", "error", "congestion", "debug", "backup" };
 
 extern "C"
+int
+ndb_mgm_get_clusterlog_loglevel(NdbMgmHandle handle, 
+				struct ndb_mgm_loglevel* loglevel,
+				unsigned int loglevel_size)
+{
+  SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_loglevel");
+  int loglevel_count = loglevel_size;
+  const ParserRow<ParserDummy> getloglevel_reply[] = {
+    MGM_CMD("get cluster loglevel", NULL, ""),
+    MGM_ARG(clusterlog_names[0], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[1], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[2], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[3], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[4], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[5], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[6], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[7], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[8], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[9], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[10], Int, Mandatory, ""),
+    MGM_ARG(clusterlog_names[11], Int, Mandatory, ""),
+  };
+  CHECK_HANDLE(handle, -1);
+  CHECK_CONNECTED(handle, -1);
+
+  Properties args;
+  const Properties *reply;
+  reply = ndb_mgm_call(handle, getloglevel_reply, "get cluster loglevel", &args);
+  CHECK_REPLY(reply, -1);
+
+  for(int i=0; i < loglevel_count; i++) {
+    reply->get(clusterlog_names[loglevel[i].category], &loglevel[i].value);
+  }
+  return loglevel_count;
+}
+
+extern "C"
 const unsigned int *
-ndb_mgm_get_clusterlog_loglevel(NdbMgmHandle handle)
+ndb_mgm_get_clusterlog_loglevel_old(NdbMgmHandle handle)
 {
   SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_loglevel");
   int loglevel_count = CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1 ;
@@ -1556,34 +1630,7 @@
 
 extern "C"
 int 
-ndb_mgm_get_stat_port(NdbMgmHandle handle, struct ndb_mgm_reply* /*reply*/)
-{
-  SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_stat_port");
-  const ParserRow<ParserDummy> stat_reply[] = {
-    MGM_CMD("error", NULL, ""),
-    MGM_ARG("result", String, Mandatory, "Error message"),
-    MGM_CMD("get statport reply", NULL, ""),
-    MGM_ARG("tcpport", Int, Mandatory, "TCP port for statistics"),
-    MGM_END()
-  };
-  CHECK_HANDLE(handle, -1);
-  CHECK_CONNECTED(handle, -1);
-  
-  Properties args;
-  const Properties *reply;
-  reply = ndb_mgm_call(handle, stat_reply, "get statport", &args);
-  CHECK_REPLY(reply, -1);
-
-  Uint32 port;
-  reply->get("tcpport", &port);
-
-  delete reply;
-  return port;
-}
-
-extern "C"
-int 
-ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, int* _args,
+ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, const int * _args,
 		   int _num_args, struct ndb_mgm_reply* /* reply */) 
 {
   SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_dump_state");
@@ -2046,7 +2093,7 @@
       break;
 
     void *tmp_data = malloc(base64_needed_decoded_length((size_t) (len - 1)));
-    const int res = base64_decode(buf64, len-1, tmp_data);
+    const int res = base64_decode(buf64, len-1, tmp_data, NULL);
     delete[] buf64;
     UtilBuffer tmp;
     tmp.append((void *) tmp_data, res);
@@ -2432,9 +2479,9 @@
 				     int param,
 				     int value,
 				     struct ndb_mgm_reply* mgmreply){
-  DBUG_ENTER("ndb_mgm_set_connection_int_parameter");
   CHECK_HANDLE(handle, 0);
   CHECK_CONNECTED(handle, 0);
+  DBUG_ENTER("ndb_mgm_set_connection_int_parameter");
   
   Properties args;
   args.put("node1", node1);
@@ -2451,7 +2498,7 @@
   
   const Properties *prop;
   prop= ndb_mgm_call(handle, reply, "set connection parameter", &args);
-  CHECK_REPLY(prop, -1);
+  DBUG_CHECK_REPLY(prop, -1);
 
   int res= -1;
   do {
@@ -2475,9 +2522,9 @@
 				     int param,
 				     int *value,
 				     struct ndb_mgm_reply* mgmreply){
-  DBUG_ENTER("ndb_mgm_get_connection_int_parameter");
   CHECK_HANDLE(handle, -1);
   CHECK_CONNECTED(handle, -2);
+  DBUG_ENTER("ndb_mgm_get_connection_int_parameter");
   
   Properties args;
   args.put("node1", node1);
@@ -2493,7 +2540,7 @@
   
   const Properties *prop;
   prop = ndb_mgm_call(handle, reply, "get connection parameter", &args);
-  CHECK_REPLY(prop, -3);
+  DBUG_CHECK_REPLY(prop, -3);
 
   int res= -1;
   do {
@@ -2541,9 +2588,9 @@
 {
   Uint32 nodeid=0;
 
-  DBUG_ENTER("ndb_mgm_get_mgmd_nodeid");
   CHECK_HANDLE(handle, 0);
   CHECK_CONNECTED(handle, 0);
+  DBUG_ENTER("ndb_mgm_get_mgmd_nodeid");
   
   Properties args;
 
@@ -2555,7 +2602,7 @@
   
   const Properties *prop;
   prop = ndb_mgm_call(handle, reply, "get mgmd nodeid", &args);
-  CHECK_REPLY(prop, 0);
+  DBUG_CHECK_REPLY(prop, 0);
 
   if(!prop->get("nodeid",&nodeid)){
     fprintf(handle->errstream, "Unable to get value\n");
@@ -2569,9 +2616,9 @@
 extern "C"
 int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length)
 {
-  DBUG_ENTER("ndb_mgm_report_event");
   CHECK_HANDLE(handle, 0);
   CHECK_CONNECTED(handle, 0);
+  DBUG_ENTER("ndb_mgm_report_event");
 
   Properties args;
   args.put("length", length);
@@ -2590,7 +2637,7 @@
   
   const Properties *prop;
   prop = ndb_mgm_call(handle, reply, "report event", &args);
-  CHECK_REPLY(prop, -1);
+  DBUG_CHECK_REPLY(prop, -1);
 
   DBUG_RETURN(0);
 }
@@ -2598,9 +2645,9 @@
 extern "C"
 int ndb_mgm_end_session(NdbMgmHandle handle)
 {
-  DBUG_ENTER("ndb_mgm_end_session");
   CHECK_HANDLE(handle, 0);
   CHECK_CONNECTED(handle, 0);
+  DBUG_ENTER("ndb_mgm_end_session");
 
   SocketOutputStream s_output(handle->socket);
   s_output.println("end session");
@@ -2663,6 +2710,106 @@
 
   delete prop;
   DBUG_RETURN(1);
+}
+
+extern "C"
+Uint64
+ndb_mgm_get_session_id(NdbMgmHandle handle)
+{
+  Uint64 session_id=0;
+
+  DBUG_ENTER("ndb_mgm_get_session_id");
+  CHECK_HANDLE(handle, 0);
+  CHECK_CONNECTED(handle, 0);
+  
+  Properties args;
+
+  const ParserRow<ParserDummy> reply[]= {
+    MGM_CMD("get session id reply", NULL, ""),
+    MGM_ARG("id", Int, Mandatory, "Node ID"),
+    MGM_END()
+  };
+  
+  const Properties *prop;
+  prop = ndb_mgm_call(handle, reply, "get session id", &args);
+  CHECK_REPLY(prop, 0);
+
+  if(!prop->get("id",&session_id)){
+    fprintf(handle->errstream, "Unable to get session id\n");
+    return 0;
+  }
+
+  delete prop;
+  DBUG_RETURN(session_id);
+}
+
+extern "C"
+int
+ndb_mgm_get_session(NdbMgmHandle handle, Uint64 id,
+                    struct NdbMgmSession *s, int *len)
+{
+  int retval= 0;
+  DBUG_ENTER("ndb_mgm_get_session");
+  CHECK_HANDLE(handle, 0);
+  CHECK_CONNECTED(handle, 0);
+
+  Properties args;
+  args.put("id", id);
+
+  const ParserRow<ParserDummy> reply[]= {
+    MGM_CMD("get session reply", NULL, ""),
+    MGM_ARG("id", Int, Mandatory, "Node ID"),
+    MGM_ARG("m_stopSelf", Int, Optional, "m_stopSelf"),
+    MGM_ARG("m_stop", Int, Optional, "stop session"),
+    MGM_ARG("nodeid", Int, Optional, "allocated node id"),
+    MGM_ARG("parser_buffer_len", Int, Optional, "waiting in buffer"),
+    MGM_ARG("parser_status", Int, Optional, "parser status"),
+    MGM_END()
+  };
+
+  const Properties *prop;
+  prop = ndb_mgm_call(handle, reply, "get session", &args);
+  CHECK_REPLY(prop, 0);
+
+  Uint64 r_id;
+  int rlen= 0;
+
+  if(!prop->get("id",&r_id)){
+    fprintf(handle->errstream, "Unable to get session id\n");
+    goto err;
+  }
+
+  s->id= r_id;
+  rlen+=sizeof(s->id);
+
+  if(prop->get("m_stopSelf",&(s->m_stopSelf)))
+    rlen+=sizeof(s->m_stopSelf);
+  else
+    goto err;
+
+  if(prop->get("m_stop",&(s->m_stop)))
+    rlen+=sizeof(s->m_stop);
+  else
+    goto err;
+
+  if(prop->get("nodeid",&(s->nodeid)))
+    rlen+=sizeof(s->nodeid);
+  else
+    goto err;
+
+  if(prop->get("parser_buffer_len",&(s->parser_buffer_len)))
+  {
+    rlen+=sizeof(s->parser_buffer_len);
+    if(prop->get("parser_status",&(s->parser_status)))
+      rlen+=sizeof(s->parser_status);
+  }
+
+  *len= rlen;
+  retval= 1;
+
+err:
+  delete prop;
+  DBUG_RETURN(retval);
 }
 
 template class Vector<const ParserRow<ParserDummy>*>;
Thread
bk commit into 5.1 tree (stewart:1.2399)Stewart Smith23 Jan