20 #include <BlockNumbers.h>
21 #include <signaldata/ScanTab.hpp>
22 #include <signaldata/ScanFrag.hpp>
25 printSCANTABREQ(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
29 const UintR requestInfo = sig->requestInfo;
31 fprintf(output,
" apiConnectPtr: H\'%.8x",
33 fprintf(output,
" requestInfo: H\'%.8x:\n", requestInfo);
34 fprintf(output,
" Parallellism: %u Batch: %u LockMode: %u Keyinfo: %u Holdlock: %u RangeScan: %u Descending: %u TupScan: %u\n ReadCommitted: %u DistributionKeyFlag: %u NoDisk: %u spj: %u",
35 sig->getParallelism(requestInfo),
36 sig->getScanBatch(requestInfo),
37 sig->getLockMode(requestInfo),
38 sig->getKeyinfoFlag(requestInfo),
39 sig->getHoldLockFlag(requestInfo),
40 sig->getRangeScanFlag(requestInfo),
41 sig->getDescendingFlag(requestInfo),
42 sig->getTupScanFlag(requestInfo),
43 sig->getReadCommittedFlag(requestInfo),
44 sig->getDistributionKeyFlag(requestInfo),
45 sig->getNoDiskFlag(requestInfo),
46 sig->getViaSPJFlag(requestInfo));
48 if(sig->getDistributionKeyFlag(requestInfo))
49 fprintf(output,
" DKey: %x", sig->distributionKey);
51 Uint32 keyLen = (sig->attrLenKeyLen >> 16);
52 Uint32 attrLen = (sig->attrLenKeyLen & 0xFFFF);
53 fprintf(output,
" attrLen: %d, keyLen: %d tableId: %d, tableSchemaVer: %d\n",
54 attrLen, keyLen, sig->tableId, sig->tableSchemaVersion);
56 fprintf(output,
" transId(1, 2): (H\'%.8x, H\'%.8x) storedProcId: H\'%.8x\n",
57 sig->transId1, sig->transId2, sig->storedProcId);
58 fprintf(output,
" batch_byte_size: %d, first_batch_size: %d\n",
59 sig->batch_byte_size, sig->first_batch_size);
64 printSCANTABCONF(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
68 const UintR requestInfo = sig->requestInfo;
70 fprintf(output,
" apiConnectPtr: H\'%.8x\n",
72 fprintf(output,
" transId(1, 2): (H\'%.8x, H\'%.8x)\n",
73 sig->transId1, sig->transId2);
75 fprintf(output,
" requestInfo: Eod: %d OpCount: %d\n",
76 (requestInfo & ScanTabConf::EndOfData) == ScanTabConf::EndOfData,
77 (requestInfo & (~ScanTabConf::EndOfData)));
78 size_t op_count= requestInfo & (~
ScanTabConf::EndOfData);
81 fprintf(output,
" Operation(s) [api tc rows len]:\n");
82 if (len == ScanTabConf::SignalLength + 4 * op_count)
84 ScanTabConf::OpData * op = (ScanTabConf::OpData*)
85 (theData + ScanTabConf::SignalLength);
86 for(
size_t i = 0;
i<op_count;
i++)
88 fprintf(output,
" [0x%x 0x%x %d %d]",
89 op->apiPtrI, op->tcPtrI,
96 assert(len == ScanTabConf::SignalLength + 3 * op_count);
97 for(
size_t i = 0;
i<op_count;
i++)
99 ScanTabConf::OpData * op = (ScanTabConf::OpData*)
100 (theData + ScanTabConf::SignalLength + 3 *
i);
101 fprintf(output,
" [0x%x 0x%x %d %d]",
102 op->apiPtrI, op->tcPtrI,
103 ScanTabConf::getRows(op->rows),
104 ScanTabConf::getLength(op->rows));
107 fprintf(output,
"\n");
113 printSCANTABREF(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
117 fprintf(output,
" apiConnectPtr: H\'%.8x\n",
120 fprintf(output,
" transId(1, 2): (H\'%.8x, H\'%.8x)\n",
121 sig->transId1, sig->transId2);
123 fprintf(output,
" Errorcode: %u\n", sig->errorCode);
125 fprintf(output,
" closeNeeded: %u\n", sig->closeNeeded);
131 printSCANFRAGNEXTREQ(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
134 fprintf(output,
" senderData: H\'%.8x\n",
137 fprintf(output,
" transId(1, 2): (H\'%.8x, H\'%.8x)\n",
138 sig->transId1, sig->transId2);
140 fprintf(output,
" requestInfo: 0x%.8x\n", sig->requestInfo);
142 fprintf(output,
" batch_size_rows: %u\n", sig->batch_size_rows);
143 fprintf(output,
" batch_size_bytes: %u\n", sig->batch_size_bytes);
149 printSCANNEXTREQ(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
151 if(receiverBlockNo == DBTC){
154 fprintf(output,
" apiConnectPtr: H\'%.8x\n",
157 fprintf(output,
" transId(1, 2): (H\'%.8x, H\'%.8x) ",
158 sig->transId1, sig->transId2);
160 fprintf(output,
" Stop this scan: %u\n", sig->stopScan);
162 const Uint32 * ops = theData + ScanNextReq::SignalLength;
163 if(len > ScanNextReq::SignalLength){
164 fprintf(output,
" tcFragPtr(s): ");
165 for(
size_t i = ScanNextReq::SignalLength;
i<len;
i++)
166 fprintf(output,
" 0x%x", * ops++);
167 fprintf(output,
"\n");
170 if (receiverBlockNo == DBLQH){
171 return printSCANFRAGNEXTREQ(output, theData, len, receiverBlockNo);