Commit 84883229 authored by joreland@mysql.com's avatar joreland@mysql.com

wl1671 - bug fix

parent 46455f57
...@@ -74,17 +74,28 @@ printSCANTABCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recei ...@@ -74,17 +74,28 @@ printSCANTABCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recei
fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n", fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n",
sig->transId1, sig->transId2); sig->transId1, sig->transId2);
fprintf(output, " requestInfo: H\'%.8x(EndOfData: %d)\n", fprintf(output, " requestInfo: Eod: %d OpCount: %d\n",
requestInfo, (requestInfo & ScanTabConf::EndOfData != 0)); (requestInfo & ScanTabConf::EndOfData == ScanTabConf::EndOfData),
#if 0 (requestInfo & (~ScanTabConf::EndOfData)));
fprintf(output, " Operation(s):\n"); size_t op_count= requestInfo & (~ScanTabConf::EndOfData);
for(int i = 0; i<16; i++){ if(op_count){
fprintf(output, " [%.2u]ix=%d l=%.2d,", fprintf(output, " Operation(s) [api tc rows len]:\n");
i, sig->getIdx(sig->operLenAndIdx[i]), sig->getLen(sig->operLenAndIdx[i])); ScanTabConf::OpData * op = (ScanTabConf::OpData*)
if (((i+1) % 4) == 0) (theData + ScanTabConf::SignalLength);
fprintf(output, "\n"); for(int i = 0; i<op_count; i++){
if(op->info != ScanTabConf::EndOfData)
fprintf(output, " [0x%x 0x%x %d %d]",
op->apiPtrI, op->tcPtrI,
ScanTabConf::getRows(op->info),
ScanTabConf::getLength(op->info));
else
fprintf(output, " [0x%x 0x%x eod]",
op->apiPtrI, op->tcPtrI);
op++;
}
fprintf(output, "\n");
} }
#endif
return false; return false;
} }
...@@ -146,13 +157,21 @@ printSCANNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recei ...@@ -146,13 +157,21 @@ printSCANNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recei
if(receiverBlockNo == DBTC){ if(receiverBlockNo == DBTC){
const ScanNextReq * const sig = (ScanNextReq *) theData; const ScanNextReq * const sig = (ScanNextReq *) theData;
fprintf(output, " aipConnectPtr: H\'%.8x\n", fprintf(output, " apiConnectPtr: H\'%.8x\n",
sig->apiConnectPtr); sig->apiConnectPtr);
fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n", fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x) ",
sig->transId1, sig->transId2); sig->transId1, sig->transId2);
fprintf(output, " Stop this scan: %u\n", sig->stopScan); fprintf(output, " Stop this scan: %u\n", sig->stopScan);
const Uint32 * ops = theData + ScanNextReq::SignalLength;
if(len > ScanNextReq::SignalLength){
fprintf(output, " tcFragPtr(s): ");
for(size_t i = ScanNextReq::SignalLength; i<len; i++)
fprintf(output, " 0x%x", * ops++);
fprintf(output, "\n");
}
} }
if (receiverBlockNo == DBLQH){ if (receiverBlockNo == DBLQH){
return printSCANFRAGNEXTREQ(output, theData, len, receiverBlockNo); return printSCANFRAGNEXTREQ(output, theData, len, receiverBlockNo);
......
...@@ -475,11 +475,11 @@ int NdbScanOperation::nextResult(bool fetchAllowed) ...@@ -475,11 +475,11 @@ int NdbScanOperation::nextResult(bool fetchAllowed)
/** /**
* We have advanced atleast one bucket * We have advanced atleast one bucket
*/ */
if(!fetchAllowed){ if(!fetchAllowed || !retVal){
m_current_api_receiver = idx; m_current_api_receiver = idx;
return retVal; return retVal;
} }
Uint32 nodeId = theNdbCon->theDBnode; Uint32 nodeId = theNdbCon->theDBnode;
TransporterFacade* tp = TransporterFacade::instance(); TransporterFacade* tp = TransporterFacade::instance();
Guard guard(tp->theMutexPtr); Guard guard(tp->theMutexPtr);
......
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