summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2005-04-13 16:24:17 +0200
committerunknown <mskold@mysql.com>2005-04-13 16:24:17 +0200
commitf0438d548731b674ba989710da0994ac752c623d (patch)
treea1492386b6bc2738d5f8216a4814cf7d15ec4dad /ndb
parent5630f0731ab020471108c67e7ae962ba6eaef625 (diff)
parentf53284f1933d721e3f2a583c2849d9c1b2e2b740 (diff)
downloadmariadb-git-f0438d548731b674ba989710da0994ac752c623d.tar.gz
Merge
innobase/dict/dict0dict.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/include/dict0dict.h: Auto merged innobase/row/row0mysql.c: Auto merged myisam/mi_check.c: Auto merged myisam/mi_dynrec.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/kill.result: Auto merged mysql-test/t/kill.test: Auto merged ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged ndb/src/kernel/main.cpp: Auto merged ndb/src/mgmsrv/MgmtSrvr.hpp: Auto merged sql/ha_innodb.cc: Auto merged sql/mysqld.cc: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp45
-rw-r--r--ndb/src/kernel/main.cpp2
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp12
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.hpp2
-rw-r--r--ndb/src/ndbapi/Ndb.cpp14
5 files changed, 63 insertions, 12 deletions
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index af75707560a..b2ed7acd347 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -69,6 +69,9 @@
#include <signaldata/FsOpenReq.hpp>
#include <DebuggerNames.hpp>
+#include <EventLogger.hpp>
+extern EventLogger g_eventLogger;
+
#define SYSFILE ((Sysfile *)&sysfileData[0])
#define RETURN_IF_NODE_NOT_ALIVE(node) \
@@ -13131,6 +13134,48 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
}
}
}
+
+ if(dumpState->args[0] == 7019 && signal->getLength() == 2)
+ {
+ char buf2[8+1];
+ NodeRecordPtr nodePtr;
+ nodePtr.i = signal->theData[1];
+ ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
+ infoEvent("NF Node %d tc: %d lqh: %d dih: %d dict: %d recNODE_FAILREP: %d",
+ nodePtr.i,
+ nodePtr.p->dbtcFailCompleted,
+ nodePtr.p->dblqhFailCompleted,
+ nodePtr.p->dbdihFailCompleted,
+ nodePtr.p->dbdictFailCompleted,
+ nodePtr.p->recNODE_FAILREP);
+ infoEvent(" m_NF_COMPLETE_REP: %s m_nodefailSteps: %s",
+ nodePtr.p->m_NF_COMPLETE_REP.getText(),
+ nodePtr.p->m_nodefailSteps.getText(buf2));
+ }
+
+ if(dumpState->args[0] == 7020 && signal->getLength() > 3)
+ {
+ Uint32 gsn= signal->theData[1];
+ Uint32 block= signal->theData[2];
+ Uint32 length= signal->length() - 3;
+ memmove(signal->theData, signal->theData+3, 4*length);
+ sendSignal(numberToRef(block, getOwnNodeId()), gsn, signal, length, JBB);
+
+ warningEvent("-- SENDING CUSTOM SIGNAL --");
+ char buf[100], buf2[100];
+ buf2[0]= 0;
+ for(Uint32 i = 0; i<length; i++)
+ {
+ snprintf(buf, 100, "%s %.8x", buf2, signal->theData[i]);
+ snprintf(buf2, 100, "%s", buf);
+ }
+ warningEvent("gsn: %d block: %s, length: %d theData: %s",
+ gsn, getBlockName(block, "UNKNOWN"), length, buf);
+
+ g_eventLogger.warning("-- SENDING CUSTOM SIGNAL --");
+ g_eventLogger.warning("gsn: %d block: %s, length: %d theData: %s",
+ gsn, getBlockName(block, "UNKNOWN"), length, buf);
+ }
if(dumpState->args[0] == DumpStateOrd::DihDumpLCPState){
infoEvent("-- Node %d LCP STATE --", getOwnNodeId());
diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp
index bd15ef37e20..543757153d3 100644
--- a/ndb/src/kernel/main.cpp
+++ b/ndb/src/kernel/main.cpp
@@ -61,7 +61,9 @@ int main(int argc, char** argv)
// Print to stdout/console
g_eventLogger.createConsoleHandler();
g_eventLogger.setCategory("NDB");
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_CRITICAL);
g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR);
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_WARNING);
globalEmulatorData.create();
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 21c3c4d614d..86a5f3e8f4b 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -2078,7 +2078,7 @@ MgmtSrvr::handleStopReply(NodeId nodeId, Uint32 errCode)
}
void
-MgmtSrvr::handleStatus(NodeId nodeId, bool alive)
+MgmtSrvr::handleStatus(NodeId nodeId, bool alive, bool nfComplete)
{
DBUG_ENTER("MgmtSrvr::handleStatus");
Uint32 theData[25];
@@ -2087,9 +2087,14 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive)
m_started_nodes.push_back(nodeId);
theData[0] = NDB_LE_Connected;
} else {
- handleStopReply(nodeId, 0);
theData[0] = NDB_LE_Disconnected;
+ if(nfComplete)
+ {
+ handleStopReply(nodeId, 0);
+ DBUG_VOID_RETURN;
+ }
}
+
eventReport(_ownNodeId, theData);
DBUG_VOID_RETURN;
}
@@ -2114,8 +2119,7 @@ MgmtSrvr::nodeStatusNotification(void* mgmSrv, Uint32 nodeId,
{
DBUG_ENTER("MgmtSrvr::nodeStatusNotification");
DBUG_PRINT("enter",("nodeid= %d, alive= %d, nfComplete= %d", nodeId, alive, nfComplete));
- if(!(!alive && nfComplete))
- ((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive);
+ ((MgmtSrvr*)mgmSrv)->handleStatus(nodeId, alive, nfComplete);
DBUG_VOID_RETURN;
}
diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp
index 95298630230..637f54f74a8 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.hpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.hpp
@@ -584,7 +584,7 @@ private:
// Returns: -
//**************************************************************************
- void handleStatus(NodeId nodeId, bool alive);
+ void handleStatus(NodeId nodeId, bool alive, bool nfComplete);
//**************************************************************************
// Description: Handle the death of a process
// Parameters:
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp
index 651415cdc00..c01ce823dc0 100644
--- a/ndb/src/ndbapi/Ndb.cpp
+++ b/ndb/src/ndbapi/Ndb.cpp
@@ -761,7 +761,7 @@ Ndb::getAutoIncrementValue(const char* aTableName, Uint32 cacheSize)
Ndb_local_table_info *info=
theDictionary->get_local_table_info(internalTableName, false);
if (info == 0)
- DBUG_RETURN(~0);
+ DBUG_RETURN(~(Uint64)0);
const NdbTableImpl *table= info->m_table_impl;
Uint64 tupleId = getTupleIdFromNdb(table->m_tableId, cacheSize);
DBUG_PRINT("info", ("value %u", tupleId));
@@ -773,7 +773,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable, Uint32 cacheSize
{
DBUG_ENTER("getAutoIncrementValue");
if (aTable == 0)
- DBUG_RETURN(~0);
+ DBUG_RETURN(~(Uint64)0);
const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable);
Uint64 tupleId = getTupleIdFromNdb(table->m_tableId, cacheSize);
DBUG_PRINT("info", ("value %u", tupleId));
@@ -785,7 +785,7 @@ Ndb::getTupleIdFromNdb(const char* aTableName, Uint32 cacheSize)
{
const NdbTableImpl* table = theDictionary->getTable(aTableName);
if (table == 0)
- return ~0;
+ return ~(Uint64)0;
return getTupleIdFromNdb(table->m_tableId, cacheSize);
}
@@ -814,7 +814,7 @@ Ndb::readAutoIncrementValue(const char* aTableName)
const NdbTableImpl* table = theDictionary->getTable(aTableName);
if (table == 0) {
theError= theDictionary->getNdbError();
- DBUG_RETURN(~0);
+ DBUG_RETURN(~(Uint64)0);
}
Uint64 tupleId = readTupleIdFromNdb(table->m_tableId);
DBUG_PRINT("info", ("value %u", tupleId));
@@ -826,7 +826,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable)
{
DBUG_ENTER("readtAutoIncrementValue");
if (aTable == 0)
- DBUG_RETURN(~0);
+ DBUG_RETURN(~(Uint64)0);
const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable);
Uint64 tupleId = readTupleIdFromNdb(table->m_tableId);
DBUG_PRINT("info", ("value %u", tupleId));
@@ -863,7 +863,7 @@ Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, Uint64 val, bool
{
DEBUG_TRACE("setAutoIncrementValue " << val);
if (aTable == 0)
- return ~0;
+ return ~(Uint64)0;
const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable);
return setTupleIdInNdb(table->m_tableId, val, increase);
}
@@ -1018,7 +1018,7 @@ Ndb::opTupleIdOnNdb(Uint32 aTableId, Uint64 opValue, Uint32 op)
theError.code,
tConnection ? tConnection->theError.code : -1,
tOperation ? tOperation->theError.code : -1));
- DBUG_RETURN(~0);
+ DBUG_RETURN(~(Uint64)0);
}
Uint32