List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:October 12 2007 7:29am
Subject:Re: bk commit into 5.1 tree (justin.he:1.2604) BUG#29485
View as plain text  
Hi Justin!

On Tue, 2007-09-18 at 08:42 +0000, Justin He wrote:
> diff -Nrup a/storage/ndb/src/mgmclient/CommandInterpreter.cpp
> b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
> --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2007-09-12 12:04:58 +00:00
> +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2007-09-18 08:42:26 +00:00
> @@ -2255,6 +2255,24 @@ CommandInterpreter::executeReport(int pr
>  
>    if (found >= 0)
>    {
> +    struct ndb_mgm_cluster_state *cl = ndb_mgm_get_status(m_mgmsrv);
> +    if(cl == NULL)
> +    {
> +      ndbout_c("Cannot get status of node %d.", processId);
> +      printError();
> +      return -1;
> +    }
> +    NdbAutoPtr<char> ap1((char*)cl);
> +    int i = 0;
> +    while((i < cl->no_of_nodes) && cl->node_states[i].node_id !=
> processId)
> +      i++;
> +    if (processId && 
> +        cl->node_states[i].node_type != NDB_MGM_NODE_TYPE_NDB)
> +    {
> +      ndbout_c("Node %d: is not a data node.", processId);
> +      return -1;
> +    }
> +
>      struct st_report_cmd &cmd = report_cmds[found];
>      if (cmd.dump_cmd)
>      {

Looks okay... Although I do wish we had a nicer way of doing that...
-- 
Stewart Smith, Senior Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@stripped
Mobile: +61 4 3 8844 332

Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature]
Thread
bk commit into 5.1 tree (justin.he:1.2604) BUG#29485Justin He18 Sep
  • Re: bk commit into 5.1 tree (justin.he:1.2604) BUG#29485Stewart Smith12 Oct