diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-08-31 23:56:02 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-08-31 23:56:02 +0200 |
commit | fcc48eb33797374ff3dd7fe81c1963e0d0a017a1 (patch) | |
tree | f8754f20519cc7c1aae3660077afc656c27389bd /ndb | |
parent | 1e791cc5f37d5f9f3c1e7a14f414e83a4dd16501 (diff) | |
download | mariadb-git-fcc48eb33797374ff3dd7fe81c1963e0d0a017a1.tar.gz |
Bug#12833 corrected parsing of CLUSTERLOG command in ndb_mgm
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 77 |
1 files changed, 42 insertions, 35 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index e1619917de5..124c5c18748 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1909,47 +1909,54 @@ CommandInterpreter::executeEventReporting(int processId, return; } BaseString tmp(parameters); - Vector<BaseString> spec; - tmp.split(spec, "="); - if(spec.size() != 2){ - ndbout << "Invalid loglevel specification: " << parameters << endl; - return; - } + Vector<BaseString> 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<BaseString> 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; + } + } - ndbout << "Executing CLUSTERLOG on node " << processId << flush; + int level; + if (!convert(spec[1].c_str(),level)) + { + ndbout << "Invalid level: " << spec[1].c_str() << endl; + continue; + } - struct ndb_mgm_reply reply; - int result; - result = ndb_mgm_set_loglevel_clusterlog(m_mgmsrv, - processId, - (ndb_mgm_event_category)category, - level, - &reply); + 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); - if (result != 0) { - ndbout_c(" failed."); - printError(); - } else { - ndbout_c(" OK!"); - } + if (result != 0) { + ndbout_c(" failed."); + printError(); + } else { + ndbout_c(" OK!"); + } + } } /***************************************************************************** |