Commit 0cbb0cce authored by unknown's avatar unknown

wl2240 - ndb partitioning, bug fixes


ndb/src/common/debugger/signaldata/ScanTab.cpp:
  Fix printout of SCAN_TABREQ
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Set correct status on scanfrag record
ndb/src/ndbapi/NdbScanOperation.cpp:
  Fix setting of distribution key wrt scan
ndb/tools/select_count.cpp:
  Fix select_count
parent b51abab4
......@@ -30,20 +30,24 @@ printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
fprintf(output, " apiConnectPtr: H\'%.8x",
sig->apiConnectPtr);
fprintf(output, " requestInfo: H\'%.8x:\n", requestInfo);
fprintf(output, " Parallellism: %u, Batch: %u LockMode: %u, Keyinfo: %u Holdlock: %u, RangeScan: %u ReadCommitted: %u\n",
fprintf(output, " Parallellism: %u, Batch: %u LockMode: %u, Keyinfo: %u Holdlock: %u, RangeScan: %u ReadCommitted: %u\n DistributionKeyFlag: %u",
sig->getParallelism(requestInfo),
sig->getScanBatch(requestInfo),
sig->getLockMode(requestInfo),
sig->getKeyinfoFlag(requestInfo),
sig->getHoldLockFlag(requestInfo),
sig->getRangeScanFlag(requestInfo),
sig->getReadCommittedFlag(requestInfo));
sig->getReadCommittedFlag(requestInfo),
sig->getDistributionKeyFlag(requestInfo));
if(sig->getDistributionKeyFlag(requestInfo))
fprintf(output, " DKey: %u", sig->distributionKey);
Uint32 keyLen = (sig->attrLenKeyLen >> 16);
Uint32 attrLen = (sig->attrLenKeyLen & 0xFFFF);
fprintf(output, " attrLen: %d, keyLen: %d tableId: %d, tableSchemaVer: %d\n",
attrLen, keyLen, sig->tableId, sig->tableSchemaVersion);
fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x) storedProcId: H\'%.8x\n",
sig->transId1, sig->transId2, sig->storedProcId);
fprintf(output, " batch_byte_size: %d, first_batch_size: %d\n",
......
......@@ -8952,6 +8952,7 @@ void Dbtc::execDI_FCOUNTCONF(Signal* signal)
{
ptr.p->m_ops = 0;
ptr.p->m_totalLen = 0;
ptr.p->m_scan_frag_conf_status = 1;
ptr.p->scanFragState = ScanFragRec::QUEUED_FOR_DELIVERY;
ptr.p->stopFragTimer();
......@@ -8959,6 +8960,7 @@ void Dbtc::execDI_FCOUNTCONF(Signal* signal)
list.next(ptr);
list.remove(tmp);
queued.add(tmp);
scanptr.p->m_queued_count++;
}
}//Dbtc::execDI_FCOUNTCONF()
......
......@@ -777,8 +777,9 @@ NdbScanOperation::doSendScan(int aProcessorId)
Uint32 tmp = req->requestInfo;
ScanTabReq::setDistributionKeyFlag(tmp, theDistrKeyIndicator_);
req->distributionKey = theDistributionKey;
req->requestInfo = tmp;
tSignal->setLength(ScanTabReq::StaticLength + theDistrKeyIndicator_);
TransporterFacade *tp = TransporterFacade::instance();
LinearSectionPtr ptr[3];
ptr[0].p = m_prepared_receivers;
......
......@@ -30,7 +30,7 @@ static int
select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
int parallelism,
int* count_rows,
UtilTransactions::ScanLock lock);
NdbOperation::LockMode lock);
static const char* opt_connect_str= 0;
static const char* _dbname = "TEST_DB";
......@@ -116,7 +116,7 @@ int main(int argc, char** argv){
int rows = 0;
if (select_count(&MyNdb, pTab, _parallelism, &rows,
(UtilTransactions::ScanLock)_lock) != 0){
(NdbOperation::LockMode)_lock) != 0){
return NDBT_ProgramExit(NDBT_FAILED);
}
......@@ -129,7 +129,7 @@ int
select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
int parallelism,
int* count_rows,
UtilTransactions::ScanLock lock){
NdbOperation::LockMode lock){
int retryAttempt = 0;
const int retryMax = 100;
......@@ -180,8 +180,9 @@ select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
}
Uint64 tmp;
Uint32 row_size;
pOp->getValue(NdbDictionary::Column::ROW_COUNT, (char*)&tmp);
pOp->getValue(NdbDictionary::Column::ROW_SIZE, (char*)&row_size);
check = pTrans->execute(NoCommit);
if( check == -1 ) {
ERR(pTrans->getNdbError());
......
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