Commit dc635e59 authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/51-work

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
parents e6bb01b8 b6c7fb39
...@@ -454,6 +454,12 @@ private: ...@@ -454,6 +454,12 @@ private:
void recompute_version_info(Uint32 type, Uint32 version); void recompute_version_info(Uint32 type, Uint32 version);
void execNODE_VERSION_REP(Signal* signal); void execNODE_VERSION_REP(Signal* signal);
void sendApiVersionRep(Signal* signal, NodeRecPtr nodePtr); void sendApiVersionRep(Signal* signal, NodeRecPtr nodePtr);
void sendVersionedDb(NodeReceiverGroup rg,
GlobalSignalNumber gsn,
Signal* signal,
Uint32 length,
JobBufferLevel jbuf,
Uint32 minversion);
}; };
#endif #endif
...@@ -2785,37 +2785,51 @@ void Qmgr::execAPI_REGREQ(Signal* signal) ...@@ -2785,37 +2785,51 @@ void Qmgr::execAPI_REGREQ(Signal* signal)
recompute_version_info(type, version); recompute_version_info(type, version);
if (info.m_type[NodeInfo::DB].m_min_version >= NDBD_NODE_VERSION_REP) signal->theData[0] = apiNodePtr.i;
{ signal->theData[1] = version;
jam();
NodeReceiverGroup rg(QMGR, c_clusterNodes); NodeReceiverGroup rg(QMGR, c_clusterNodes);
rg.m_nodes.clear(getOwnNodeId()); rg.m_nodes.clear(getOwnNodeId());
sendVersionedDb(rg, GSN_NODE_VERSION_REP, signal, 2, JBB,
NDBD_NODE_VERSION_REP);
signal->theData[0] = apiNodePtr.i; signal->theData[0] = apiNodePtr.i;
signal->theData[1] = version; EXECUTE_DIRECT(NDBCNTR, GSN_API_START_REP, signal, 1);
sendSignal(rg, GSN_NODE_VERSION_REP, signal, 2, JBB); }
return;
}//Qmgr::execAPI_REGREQ()
void
Qmgr::sendVersionedDb(NodeReceiverGroup rg,
GlobalSignalNumber gsn,
Signal* signal,
Uint32 length,
JobBufferLevel jbuf,
Uint32 minversion)
{
jam();
NodeVersionInfo info = getNodeVersionInfo();
if (info.m_type[NodeInfo::DB].m_min_version >= minversion)
{
jam();
sendSignal(rg, gsn, signal, length, jbuf);
} }
else else
{ {
Uint32 i = 0; jam();
while((i = c_clusterNodes.find(i + 1)) != NdbNodeBitmask::NotFound) Uint32 i = 0, cnt = 0;
while((i = rg.m_nodes.find(i + 1)) != NodeBitmask::NotFound)
{ {
jam(); jam();
if (i == getOwnNodeId()) if (getNodeInfo(i).m_version >= minversion)
continue;
if (getNodeInfo(i).m_version >= NDBD_NODE_VERSION_REP)
{ {
jam(); jam();
sendSignal(calcQmgrBlockRef(i), GSN_NODE_VERSION_REP, signal, 2,JBB); cnt++;
} sendSignal(numberToRef(rg.m_block, i), gsn, signal, length, jbuf);
} }
} }
ndbassert(cnt < rg.m_nodes.count());
signal->theData[0] = apiNodePtr.i;
EXECUTE_DIRECT(NDBCNTR, GSN_API_START_REP, signal, 1);
} }
return; }
}//Qmgr::execAPI_REGREQ()
void void
Qmgr::execAPI_VERSION_REQ(Signal * signal) { Qmgr::execAPI_VERSION_REQ(Signal * signal) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment