3869 Jonas Oreland 2010-10-06 [merge]
ndb - merge 70 to 71
modified:
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
3868 Jonas Oreland 2010-10-05 [merge]
ndb - merge 70 to 71
added:
storage/ndb/src/ndbapi/trp_client.cpp
modified:
storage/ndb/src/ndbapi/CMakeLists.txt
storage/ndb/src/ndbapi/Makefile.am
storage/ndb/src/ndbapi/Ndbif.cpp
storage/ndb/src/ndbapi/TransporterFacade.cpp
storage/ndb/src/ndbapi/TransporterFacade.hpp
storage/ndb/src/ndbapi/trp_client.hpp
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2010-10-05 10:02:43 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2010-10-06 07:14:56 +0000
@@ -11348,15 +11348,34 @@ void Dbtc::sendScanFragReq(Signal* signa
bool longFragReq= ((version >= NDBD_LONG_SCANFRAGREQ) &&
(! ERROR_INSERTED(8070) &&
! ERROR_INSERTED(8088)));
- Uint32 reqKeyLen= 0;
- Uint32 reqAttrLen= 0;
- if (unlikely(! longFragReq))
- {
- reqKeyLen= scanP->scanKeyLen;
- reqAttrLen= scanP->scanAiLength;
- }
cachePtr.i = apiConnectptr.p->cachePtr;
ptrCheckGuard(cachePtr, ccacheFilesize, cacheRecord);
+
+ Uint32 reqKeyLen = scanP->scanKeyLen;
+
+ SectionHandle sections(this);
+ sections.m_ptr[0].i = cachePtr.p->attrInfoSectionI;
+ sections.m_cnt = 1;
+
+ if (reqKeyLen > 0)
+ {
+ jam();
+ ndbassert(cachePtr.p->keyInfoSectionI != RNIL);
+ sections.m_ptr[1].i = cachePtr.p->keyInfoSectionI;
+ sections.m_cnt = 2;
+ }
+
+ if (isLastReq)
+ {
+ /* This send will release these sections, remove our
+ * references to them
+ */
+ cachePtr.p->attrInfoSectionI = RNIL;
+ cachePtr.p->keyInfoSectionI = RNIL;
+ }
+
+ getSections(sections.m_cnt, sections.m_ptr);
+
ScanFragReq * const req = (ScanFragReq *)&signal->theData[0];
Uint32 requestInfo = scanP->scanRequestInfo;
ScanFragReq::setScanPrio(requestInfo, 1);
@@ -11379,29 +11398,6 @@ void Dbtc::sendScanFragReq(Signal* signa
{
jam();
/* Send long, possibly fragmented SCAN_FRAGREQ */
- /* Create SectionHandle */
- SectionHandle sections(this);
- sections.m_ptr[0].i= cachePtr.p->attrInfoSectionI;
- sections.m_cnt= 1;
-
- if (scanP->scanKeyLen > 0)
- {
- jam();
- ndbassert(cachePtr.p->keyInfoSectionI != RNIL);
- sections.m_ptr[1].i= cachePtr.p->keyInfoSectionI;
- sections.m_cnt= 2;
- }
-
- if (isLastReq)
- {
- /* This send will release these sections, remove our
- * references to them
- */
- cachePtr.p->attrInfoSectionI= RNIL;
- cachePtr.p->keyInfoSectionI= RNIL;
- }
-
- getSections(sections.m_cnt, sections.m_ptr);
// TODO :
// 1) Consider whether to adjust fragmentation threshold
@@ -11449,10 +11445,11 @@ void Dbtc::sendScanFragReq(Signal* signa
/* Short SCANFRAGREQ with separate KeyInfo and AttrInfo trains
* Sent to older NDBD nodes during upgrade
*/
+ Uint32 reqAttrLen = sections.m_ptr[0].sz;
ScanFragReq::setAttrLen(req->requestInfo, reqAttrLen);
sendSignal(scanFragP->lqhBlockref, GSN_SCAN_FRAGREQ, signal,
ScanFragReq::SignalLength, JBB);
- if(scanP->scanKeyLen > 0)
+ if(reqKeyLen > 0)
{
jam();
tcConnectptr.i = scanFragptr.i;
@@ -11461,7 +11458,7 @@ void Dbtc::sendScanFragReq(Signal* signa
scanFragP->lqhBlockref,
scanFragptr.i,
0, // Offset 0
- cachePtr.p->keyInfoSectionI);
+ sections.m_ptr[1].i);
}
if(ERROR_INSERTED(8035))
@@ -11473,19 +11470,20 @@ void Dbtc::sendScanFragReq(Signal* signa
scanFragP->lqhBlockref,
scanFragptr.i,
0, // Offset 0
- cachePtr.p->attrInfoSectionI));
+ sections.m_ptr[0].i));
}
-
+
if(ERROR_INSERTED(8035))
globalTransporterRegistry.performSend();
if (isLastReq)
{
/* Free the sections here */
- releaseSection(cachePtr.p->attrInfoSectionI);
- releaseSection(cachePtr.p->keyInfoSectionI);
- cachePtr.p->attrInfoSectionI= RNIL;
- cachePtr.p->keyInfoSectionI= RNIL;
+ releaseSections(sections);
+ }
+ else
+ {
+ sections.clear();
}
}
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101006073312-tix73z7yo49j0spq.bundle
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.1 branch (jonas:3868 to 3869) | Jonas Oreland | 6 Oct |