summaryrefslogtreecommitdiff
path: root/ndb/src
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src')
-rw-r--r--ndb/src/kernel/blocks/dblqh/Dblqh.hpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhMain.cpp28
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp6
-rw-r--r--ndb/src/kernel/error/TimeModule.cpp2
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp10
-rw-r--r--ndb/src/ndbapi/ClusterMgr.cpp13
-rw-r--r--ndb/src/ndbapi/ClusterMgr.hpp2
-rw-r--r--ndb/src/ndbapi/NdbRecAttr.cpp6
8 files changed, 55 insertions, 15 deletions
diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
index 00367a7aa9d..4474d226a27 100644
--- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
@@ -2059,6 +2059,9 @@ public:
Uint8 simpleRead;
Uint8 seqNoReplica;
Uint8 tcNodeFailrec;
+#ifdef VM_TRACE
+ Uint8 tupkeyref;
+#endif
}; /* p2c: size = 280 bytes */
typedef Ptr<TcConnectionrec> TcConnectionrecPtr;
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 9944adf4ede..684598364ab 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -2765,6 +2765,12 @@ void Dblqh::execTUPKEYREF(Signal* signal)
tcConnectptr.i = tupKeyRef->userRef;
terrorCode = tupKeyRef->errorCode;
ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
+
+#ifdef VM_TRACE
+ ndbrequire(tcConnectptr.p->tupkeyref == 0);
+ tcConnectptr.p->tupkeyref = 1;
+#endif
+
switch (tcConnectptr.p->transactionState) {
case TcConnectionrec::WAIT_TUP:
jam();
@@ -3330,6 +3336,10 @@ void Dblqh::seizeTcrec()
locTcConnectptr.p->tcTimer = cLqhTimeOutCount;
locTcConnectptr.p->tableref = RNIL;
locTcConnectptr.p->savePointId = 0;
+#ifdef VM_TRACE
+ locTcConnectptr.p->tupkeyref = 1;
+#endif
+
cfirstfreeTcConrec = nextTc;
tcConnectptr = locTcConnectptr;
locTcConnectptr.p->connectState = TcConnectionrec::CONNECTED;
@@ -4049,6 +4059,9 @@ void Dblqh::execACCKEYCONF(Signal* signal)
tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec;
tupKeyReq->savePointId = tcConnectptr.p->savePointId;
+#ifdef VM_TRACE
+ tcConnectptr.p->tupkeyref = 0;
+#endif
EXECUTE_DIRECT(tup, GSN_TUPKEYREQ, signal, TupKeyReq::SignalLength);
}//Dblqh::execACCKEYCONF()
@@ -5860,6 +5873,10 @@ void Dblqh::completeUnusualLab(Signal* signal)
void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr)
{
jam();
+#ifdef VM_TRACE
+ locTcConnectptr.p->tupkeyref = 1;
+#endif
+
locTcConnectptr.p->tcTimer = 0;
locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED;
locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec;
@@ -5882,6 +5899,9 @@ void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr)
void Dblqh::releaseTcrecLog(Signal* signal, TcConnectionrecPtr locTcConnectptr)
{
jam();
+#ifdef VM_TRACE
+ locTcConnectptr.p->tupkeyref = 1;
+#endif
locTcConnectptr.p->tcTimer = 0;
locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED;
locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec;
@@ -8336,8 +8356,11 @@ void Dblqh::nextScanConfLoopLab(Signal* signal)
tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec;
tupKeyReq->savePointId = tcConnectptr.p->savePointId;
Uint32 blockNo = refToBlock(tcConnectptr.p->tcTupBlockref);
+#ifdef VM_TRACE
+ tcConnectptr.p->tupkeyref = 0;
+#endif
EXECUTE_DIRECT(blockNo, GSN_TUPKEYREQ, signal,
- TupKeyReq::SignalLength);
+ TupKeyReq::SignalLength);
}
}
@@ -9455,6 +9478,9 @@ void Dblqh::copySendTupkeyReqLab(Signal* signal)
tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec;
tupKeyReq->savePointId = tcConnectptr.p->savePointId;
Uint32 blockNo = refToBlock(tcConnectptr.p->tcTupBlockref);
+#ifdef VM_TRACE
+ tcConnectptr.p->tupkeyref = 0;
+#endif
EXECUTE_DIRECT(blockNo, GSN_TUPKEYREQ, signal,
TupKeyReq::SignalLength);
}
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index 72ef9a274ec..28f3b987e7b 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -1138,7 +1138,11 @@ Dbtup::updateStartLab(Signal* signal,
regOperPtr->attrinbufLen);
} else {
jam();
- retValue = interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset);
+ if (interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset) == -1)
+ {
+ jam();
+ return -1;
+ }
}//if
if (retValue == -1) {
diff --git a/ndb/src/kernel/error/TimeModule.cpp b/ndb/src/kernel/error/TimeModule.cpp
index 1c01f91f86b..2be734842ba 100644
--- a/ndb/src/kernel/error/TimeModule.cpp
+++ b/ndb/src/kernel/error/TimeModule.cpp
@@ -18,7 +18,7 @@
#include <ndb_global.h>
#include "TimeModule.hpp"
-static const char* cMonth[] = { "x", "January", "February", "Mars", "April", "May", "June",
+static const char* cMonth[] = { "x", "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"};
static const char* cDay[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 3d7eb5bd4f1..409694fead1 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -627,6 +627,16 @@ MgmtSrvr::start(BaseString &error_string)
ndbout_c("This is probably a bug.");
}
+ /*
+ set api reg req frequency quite high:
+
+ 100 ms interval to make sure we have fairly up-to-date
+ info from the nodes. This to make sure that this info
+ is not dependent on heart beat settings in the
+ configuration
+ */
+ theFacade->theClusterMgr->set_max_api_reg_req_interval(100);
+
TransporterRegistry *reg = theFacade->get_registry();
for(unsigned int i=0;i<reg->m_transporter_interface.size();i++) {
BaseString msg;
diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp
index 7ab3ee07197..d3946dddfb7 100644
--- a/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/ndb/src/ndbapi/ClusterMgr.cpp
@@ -68,6 +68,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
clusterMgrThreadMutex = NdbMutex_Create();
waitForHBCond= NdbCondition_Create();
waitingForHB= false;
+ m_max_api_reg_req_interval= 0xFFFFFFFF; // MAX_INT
noOfAliveNodes= 0;
noOfConnectedNodes= 0;
theClusterMgrThread= 0;
@@ -251,7 +252,7 @@ ClusterMgr::threadMain( ){
* Start of Secure area for use of Transporter
*/
theFacade.lock_mutex();
- for (int i = 1; i < MAX_NODES; i++){
+ for (int i = 1; i < MAX_NDB_NODES; i++){
/**
* Send register request (heartbeat) to all available nodes
* at specified timing intervals
@@ -272,7 +273,8 @@ ClusterMgr::threadMain( ){
}
theNode.hbCounter += timeSlept;
- if (theNode.hbCounter >= theNode.hbFrequency) {
+ if (theNode.hbCounter >= m_max_api_reg_req_interval ||
+ theNode.hbCounter >= theNode.hbFrequency) {
/**
* It is now time to send a new Heartbeat
*/
@@ -281,13 +283,6 @@ ClusterMgr::threadMain( ){
theNode.hbCounter = 0;
}
- /**
- * If the node is of type REP,
- * then the receiver of the signal should be API_CLUSTERMGR
- */
- if (theNode.m_info.m_type == NodeInfo::REP) {
- signal.theReceiversBlockNumber = API_CLUSTERMGR;
- }
#ifdef DEBUG_REG
ndbout_c("ClusterMgr: Sending API_REGREQ to node %d", (int)nodeId);
#endif
diff --git a/ndb/src/ndbapi/ClusterMgr.hpp b/ndb/src/ndbapi/ClusterMgr.hpp
index f5d84fee01d..467b18f2330 100644
--- a/ndb/src/ndbapi/ClusterMgr.hpp
+++ b/ndb/src/ndbapi/ClusterMgr.hpp
@@ -50,6 +50,7 @@ public:
void startThread();
void forceHB();
+ void set_max_api_reg_req_interval(unsigned int millisec) { m_max_api_reg_req_interval = millisec; }
private:
void threadMain();
@@ -83,6 +84,7 @@ public:
Uint32 m_connect_count;
private:
+ Uint32 m_max_api_reg_req_interval;
Uint32 noOfAliveNodes;
Uint32 noOfConnectedNodes;
Node theNodes[MAX_NODES];
diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp
index 996c0256baa..8de163d1c22 100644
--- a/ndb/src/ndbapi/NdbRecAttr.cpp
+++ b/ndb/src/ndbapi/NdbRecAttr.cpp
@@ -272,7 +272,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out << r.u_short_value();
break;
case NdbDictionary::Column::Tinyunsigned:
- out << (unsigned) r.u_char_value();
+ out << (unsigned) r.u_8_value();
break;
case NdbDictionary::Column::Bigint:
out << r.int64_value();
@@ -287,7 +287,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out << r.short_value();
break;
case NdbDictionary::Column::Tinyint:
- out << (int) r.char_value();
+ out << (int) r.int8_value();
break;
case NdbDictionary::Column::Binary:
if (!f.hex_format)
@@ -413,7 +413,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
break;
case NdbDictionary::Column::Year:
{
- uint year = 1900 + r.u_char_value();
+ uint year = 1900 + r.u_8_value();
char buf[40];
sprintf(buf, "%04d", year);
out << buf;