summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv
diff options
context:
space:
mode:
authorjoreland@mysql.com <>2004-08-03 14:16:16 +0200
committerjoreland@mysql.com <>2004-08-03 14:16:16 +0200
commit20c86363f54e718e5af8d4ad07e337215417c48c (patch)
treeeb716b541f43afb866960af05f2ac2646b5d570c /ndb/src/mgmsrv
parentc105f1ed8bac5e111672326b04943723eb1d56f2 (diff)
parentd861fa8577462ed85aa50713a0ab7207cfc24a40 (diff)
downloadmariadb-git-20c86363f54e718e5af8d4ad07e337215417c48c.tar.gz
Merge 4.1 with jonas irix clone
Diffstat (limited to 'ndb/src/mgmsrv')
-rw-r--r--ndb/src/mgmsrv/CommandInterpreter.cpp12
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp26
-rw-r--r--ndb/src/mgmsrv/Services.cpp5
3 files changed, 23 insertions, 20 deletions
diff --git a/ndb/src/mgmsrv/CommandInterpreter.cpp b/ndb/src/mgmsrv/CommandInterpreter.cpp
index 004fc463b70..316b6d5795e 100644
--- a/ndb/src/mgmsrv/CommandInterpreter.cpp
+++ b/ndb/src/mgmsrv/CommandInterpreter.cpp
@@ -378,7 +378,8 @@ void CommandInterpreter::executeHelp(char* parameters) {
(void)parameters; // Don't want compiler warning
if (emptyString(parameters)) {
- for (int i = 0; i<noOfHelpTexts; i++) {
+ unsigned i;
+ for (i = 0; i<noOfHelpTexts; i++) {
ndbout << helpTexts[i] << endl;
}
@@ -388,7 +389,7 @@ void CommandInterpreter::executeHelp(char* parameters) {
<< endl;
ndbout << "<category> = ";
- for(Uint32 i = 0; i<EventLogger::noOfEventCategoryNames; i++){
+ for(i = 0; i<EventLogger::noOfEventCategoryNames; i++){
ndbout << EventLogger::eventCategoryNames[i].name;
if (i < EventLogger::noOfEventCategoryNames - 1) {
ndbout << " | ";
@@ -1195,11 +1196,12 @@ CommandInterpreter::jonas(int processId, const char* parameters, bool all) {
data[0] = 12;
data[1] = 13;
-
- for(Uint32 i = 0; i<70; i++)
+
+ unsigned i;
+ for(i = 0; i<70; i++)
sec0[i] = i;
- for(Uint32 i = 0; i<123; i++)
+ for(i = 0; i<123; i++)
sec1[i] = 70+i;
signal.set(0, CMVMI, GSN_TESTSIG, 3);
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 33ac4ddcf99..511572b31f1 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -250,14 +250,12 @@ MgmtSrvr::startEventLog()
}
ndb_mgm_destroy_iterator(iter);
- if(logdest.length()==0) {
+ if(logdest.length() == 0 || logdest == "") {
logdest.assfmt("FILE:filename=%s,maxsize=1000000,maxfiles=6",
clusterLog);
}
-
if(!g_EventLogger.addHandler(logdest)) {
- ndbout << "ERROR: cannot parse \"" << logdest << "\"" << endl;
- exit(1);
+ ndbout << "Warning: could not add log destination \"" << logdest.c_str() << "\"" << endl;
}
}
@@ -1088,13 +1086,13 @@ MgmtSrvr::version(int * stopCount, bool abort,
m_versionRec.callback = callback;
m_versionRec.inUse = true ;
-
- for(Uint32 i = 0; i<MAX_NODES; i++) {
+ Uint32 i;
+ for(i = 0; i<MAX_NODES; i++) {
if (getNodeType(i) == NDB_MGM_NODE_TYPE_MGM) {
m_versionRec.callback(i, NDB_VERSION, this,0);
}
}
- for(Uint32 i = 0; i<MAX_NODES; i++) {
+ for(i = 0; i<MAX_NODES; i++) {
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB) {
node = theFacade->theClusterMgr->getNodeInfo(i);
version = node.m_info.m_version;
@@ -1105,7 +1103,7 @@ MgmtSrvr::version(int * stopCount, bool abort,
}
}
- for(Uint32 i = 0; i<MAX_NODES; i++) {
+ for(i = 0; i<MAX_NODES; i++) {
if (getNodeType(i) == NDB_MGM_NODE_TYPE_API) {
return sendVersionReq(i);
}
@@ -1565,7 +1563,8 @@ MgmtSrvr::setEventReportingLevelImpl(int processId,
const SetLogLevelOrd & ll,
bool isResend)
{
- for(Uint32 i = 0; i<ll.noOfEntries; i++){
+ Uint32 i;
+ for(i = 0; i<ll.noOfEntries; i++){
// Save log level for the cluster log
if (!isResend) {
NodeLogLevel* n = NULL;
@@ -1596,7 +1595,7 @@ MgmtSrvr::setEventReportingLevelImpl(int processId,
EventSubscribeReq * dst =
CAST_PTR(EventSubscribeReq, signal->getDataPtrSend());
- for(Uint32 i = 0; i<ll.noOfEntries; i++){
+ for(i = 0; i<ll.noOfEntries; i++){
dst->theCategories[i] = ll.theCategories[i];
dst->theLevels[i] = ll.theLevels[i];
}
@@ -1625,7 +1624,8 @@ int
MgmtSrvr::setNodeLogLevel(int processId, const SetLogLevelOrd & ll,
bool isResend)
{
- for(Uint32 i = 0; i<ll.noOfEntries; i++){
+ Uint32 i;
+ for(i = 0; i<ll.noOfEntries; i++){
// Save log level for the cluster log
if (!isResend) {
NodeLogLevel* n = NULL;
@@ -1656,7 +1656,7 @@ MgmtSrvr::setNodeLogLevel(int processId, const SetLogLevelOrd & ll,
SetLogLevelOrd * dst = CAST_PTR(SetLogLevelOrd, signal->getDataPtrSend());
- for(Uint32 i = 0; i<ll.noOfEntries; i++){
+ for(i = 0; i<ll.noOfEntries; i++){
dst->theCategories[i] = ll.theCategories[i];
dst->theLevels[i] = ll.theLevels[i];
}
@@ -1800,7 +1800,7 @@ MgmtSrvr::setSignalLoggingMode(int processId, LogMode mode,
logSpec = TestOrd::InputOutputSignals;
break;
default:
- NDB_ASSERT(false, "Unexpected value, MgmtSrvr::setSignalLoggingMode");
+ assert("Unexpected value, MgmtSrvr::setSignalLoggingMode" == 0);
}
NdbApiSignal* signal = getSignal();
diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp
index c94e1455554..4a1b5d71898 100644
--- a/ndb/src/mgmsrv/Services.cpp
+++ b/ndb/src/mgmsrv/Services.cpp
@@ -1225,7 +1225,8 @@ void
MgmStatService::println_statistics(const BaseString &line){
MutexVector<NDB_SOCKET_TYPE> copy(m_sockets.size());
m_sockets.lock();
- for(int i = m_sockets.size() - 1; i >= 0; i--){
+ int i;
+ for(i = m_sockets.size() - 1; i >= 0; i--){
if(println_socket(m_sockets[i], MAX_WRITE_TIMEOUT, line.c_str()) == -1){
copy.push_back(m_sockets[i]);
m_sockets.erase(i, false);
@@ -1233,7 +1234,7 @@ MgmStatService::println_statistics(const BaseString &line){
}
m_sockets.unlock();
- for(int i = copy.size() - 1; i >= 0; i--){
+ for(i = copy.size() - 1; i >= 0; i--){
NDB_CLOSE_SOCKET(copy[i]);
copy.erase(i);
}