From: Date: August 31 2005 11:56pm Subject: bk commit into 4.1 tree (tomas:1.2405) BUG#12833 List-Archive: http://lists.mysql.com/internals/29132 X-Bug: 12833 Message-Id: <20050831215610.703C8814C2@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 4.1 repository of tomas. When tomas 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 1.2405 05/08/31 23:56:02 tomas@stripped +1 -0 Bug#12833 corrected parsing of CLUSTERLOG command in ndb_mgm ndb/src/mgmclient/CommandInterpreter.cpp 1.50 05/08/31 23:55:59 tomas@stripped +42 -35 Bug#12833 corrected parsing of CLUSTERLOG command in ndb_mgm # 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: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/mysql-4.1 --- 1.49/ndb/src/mgmclient/CommandInterpreter.cpp 2005-07-15 13:32:05 +02:00 +++ 1.50/ndb/src/mgmclient/CommandInterpreter.cpp 2005-08-31 23:55:59 +02:00 @@ -1909,47 +1909,54 @@ return; } BaseString tmp(parameters); - Vector spec; - tmp.split(spec, "="); - if(spec.size() != 2){ - ndbout << "Invalid loglevel specification: " << parameters << endl; - return; - } + Vector specs; + tmp.split(specs, " "); - spec[0].trim().ndb_toupper(); - int category = ndb_mgm_match_event_category(spec[0].c_str()); - if(category == NDB_MGM_ILLEGAL_EVENT_CATEGORY){ - if(!convert(spec[0].c_str(), category) || - category < NDB_MGM_MIN_EVENT_CATEGORY || - category > NDB_MGM_MAX_EVENT_CATEGORY){ - ndbout << "Unknown category: \"" << spec[0].c_str() << "\"" << endl; - return; + for (int i=0; i < specs.size(); i++) + { + Vector spec; + specs[i].split(spec, "="); + if(spec.size() != 2){ + ndbout << "Invalid loglevel specification: " << specs[i] << endl; + continue; } - } - int level; - if (!convert(spec[1].c_str(),level)) - { - ndbout << "Invalid level: " << spec[1].c_str() << endl; - return; - } + spec[0].trim().ndb_toupper(); + int category = ndb_mgm_match_event_category(spec[0].c_str()); + if(category == NDB_MGM_ILLEGAL_EVENT_CATEGORY){ + if(!convert(spec[0].c_str(), category) || + category < NDB_MGM_MIN_EVENT_CATEGORY || + category > NDB_MGM_MAX_EVENT_CATEGORY){ + ndbout << "Unknown category: \"" << spec[0].c_str() << "\"" << endl; + continue; + } + } + + int level; + if (!convert(spec[1].c_str(),level)) + { + ndbout << "Invalid level: " << spec[1].c_str() << endl; + continue; + } - ndbout << "Executing CLUSTERLOG on node " << processId << flush; + ndbout << "Executing CLUSTERLOG " << spec[0] << "=" << spec[1] + << " on node " << processId << flush; - struct ndb_mgm_reply reply; - int result; - result = ndb_mgm_set_loglevel_clusterlog(m_mgmsrv, - processId, - (ndb_mgm_event_category)category, - level, - &reply); + struct ndb_mgm_reply reply; + int result; + result = ndb_mgm_set_loglevel_clusterlog(m_mgmsrv, + processId, + (ndb_mgm_event_category)category, + level, + &reply); - if (result != 0) { - ndbout_c(" failed."); - printError(); - } else { - ndbout_c(" OK!"); - } + if (result != 0) { + ndbout_c(" failed."); + printError(); + } else { + ndbout_c(" OK!"); + } + } } /*****************************************************************************