http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ExSequence.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExSequence.cpp b/core/sql/executor/ExSequence.cpp index 6377b6e..8eed5ce 100644 --- a/core/sql/executor/ExSequence.cpp +++ b/core/sql/executor/ExSequence.cpp @@ -71,18 +71,14 @@ char *GetHistoryRowOLAP(void *data, Int32 n, // in this case. // if (n < 0) { -// LCOV_EXCL_START // this path in the code is a safe garde and may not be hit // maybe we can chage to assert or may be we can remove in the future retcode = -1; // ERROR condition return NULL; -// LCOV_EXCL_STOP } else if (n >= tcb->maxNumberHistoryRows_ && tcb->numberHistoryRows_ == tcb->maxNumberHistoryRows_) { -// LCOV_EXCL_START retcode = -1; // ERROR condition return NULL; -// LCOV_EXCL_STOP } else if (n >= tcb->numberHistoryRows_) { if(leading || (n - tcb->numberHistoryRows_) >= winSize) retcode = 0; @@ -186,7 +182,6 @@ char *GetHistoryRow(void *data, Int32 n, { return tcb->currentHistRowPtr_ - n * tcb->recLen() ; // offset back from first } -// LCOV_EXCL_START // this code is used for the legacy sequence functions-- Not sure whether to add a test // for this as the sequence functions are supposed to be replaced by OLAP functions // I am hiding this code from code coverage tool for now. @@ -205,7 +200,6 @@ char *GetHistoryRow(void *data, Int32 n, { tmpBuf = tcb->lastOLAPBuffer_; } -// LCOV_EXCL_STOP } return tmpBuf->getFirstRow() + ( tcb->maxRowsInOLAPBuffer_ - n ) * tcb->recLen(); @@ -439,9 +433,7 @@ short ExSequenceTcb::work() // if (request == ex_queue::GET_NOMORE) { - // LCOV_EXCL_START pstate->step_ = ExSeq_DONE; - // LCOV_EXCL_STOP } else { @@ -542,9 +534,7 @@ short ExSequenceTcb::work() // try again later. // if (qparent_.up->isFull()) - // LCOV_EXCL_START return WORK_OK; - // LCOV_EXCL_STOP ex_queue_entry *pentry_up = qparent_.up->getTailEntry(); @@ -625,11 +615,9 @@ short ExSequenceTcb::work() if (retCode == ex_expr::EXPR_ERROR) { - // LCOV_EXCL_START updateDiagsArea(centry); pstate->step_ = ExSeq_ERROR; break; - // LCOV_EXCL_STOP } if ( retCode == ex_expr::EXPR_FALSE) { @@ -791,9 +779,7 @@ short ExSequenceTcb::work() // if (pool_->get_free_tuple(pentry_up->getTupp(myTdb().tuppIndex_), recLen())) - // LCOV_EXCL_START return WORK_POOL_BLOCKED; - // LCOV_EXCL_STOP char *tuppData = pentry_up->getTupp (myTdb().tuppIndex_).getDataPointer(); @@ -811,10 +797,8 @@ short ExSequenceTcb::work() retCode = returnExpr()->eval(pentry_up->getAtp(),workAtp_); if (retCode == ex_expr::EXPR_ERROR) { - // LCOV_EXCL_START pstate->step_ = ExSeq_ERROR; break; - // LCOV_EXCL_STOP } } @@ -825,10 +809,8 @@ short ExSequenceTcb::work() retCode = postPred()->eval(pentry_up->getAtp(),pentry_up->getAtp()); if (retCode == ex_expr::EXPR_ERROR) { - // LCOV_EXCL_START pstate->step_ = ExSeq_ERROR; break; - // LCOV_EXCL_STOP } } @@ -876,9 +858,7 @@ short ExSequenceTcb::work() // go to the error processing state. // case ex_expr::EXPR_ERROR: - // LCOV_EXCL_START pstate->step_ = ExSeq_ERROR; - // LCOV_EXCL_STOP break; } @@ -1004,17 +984,14 @@ short ExSequenceTcb::work() { if (!overflowEnabled_) { - // LCOV_EXCL_START // used for debugging when CmpCommon::getDefault(EXE_BMO_DISABLE_OVERFLOW)is set to off ; updateDiagsArea(EXE_OLAP_OVERFLOW_NOT_SUPPORTED); pstate->step_ = ExSeq_ERROR; break; - // LCOV_EXCL_STOP } ex_assert(isUnboundedFollowing(),""); if ( ! cluster_->flush(&rc_) ) { // flush the buffers - // LCOV_EXCL_START // if no errors this code path is not visited if ( rc_ ) { // some error @@ -1022,12 +999,9 @@ short ExSequenceTcb::work() pstate->step_ = ExSeq_ERROR; break; } - // LCOV_EXCL_STOP // not all the buffers are completely flushed. An I/O is pending - // LCOV_EXCL_START // maybe we cane remove in the future return WORK_OK; - // LCOV_EXCL_STOP } // At this point -- all the buffers were completely flushed @@ -1070,17 +1044,13 @@ short ExSequenceTcb::work() isUnboundedFollowing() ); if ( ! cluster_->read(&rc_) ) { - // LCOV_EXCL_START if ( rc_ ) { // some error updateDiagsArea( rc_); pstate->step_ = ExSeq_ERROR; break; } - // LCOV_EXCL_STOP // not all the buffers are completely read. An I/O is pending - // LCOV_EXCL_START return WORK_OK; - // LCOV_EXCL_STOP } numberOfRowsReturnedBeforeReadOF_ = 0; @@ -1107,9 +1077,7 @@ short ExSequenceTcb::work() // try again later. // if (qparent_.up->isFull()) - // LCOV_EXCL_START return WORK_OK; - // LCOV_EXCL_STOP ex_queue_entry * pentry_up = qparent_.up->getTailEntry(); pentry_up->upState.status = ex_queue::Q_NO_DATA; @@ -1137,7 +1105,6 @@ short ExSequenceTcb::work() if (qparent_.down->isEmpty()) return WORK_OK; - // LCOV_EXCL_START // If we haven't given to our child the new head // index return and ask to be called again. // @@ -1149,7 +1116,6 @@ short ExSequenceTcb::work() pentry_down = qparent_.down->getHeadEntry(); pstate = (ExSequencePrivateState*) pentry_down->pstate; request = pentry_down->downState.request; - // LCOV_EXCL_STOP } break; } // switch pstate->step_ @@ -1252,14 +1218,11 @@ NABoolean ExSequenceTcb::removeOLAPBuffer() if (lastOLAPBuffer_ == NULL || firstOLAPBuffer_ == NULL) { - // LCOV_EXCL_START return FALSE; - // LCOV_EXCL_STOP } if (lastOLAPBuffer_ == firstOLAPBuffer_) { - // LCOV_EXCL_START // since we keep a minimum number of buffers this code won't be visited // this code should not be removed. if we decide to not keep a min number // of buffers in the list it will be used @@ -1269,7 +1232,6 @@ NABoolean ExSequenceTcb::removeOLAPBuffer() lastOLAPBuffer_ = NULL; firstOLAPBuffer_ = NULL; return TRUE; - // LCOV_EXCL_STOP } HashBuffer * tmpBuf = lastOLAPBuffer_; @@ -1287,9 +1249,7 @@ NABoolean ExSequenceTcb::shrinkOLAPBufferList() { if (! removeOLAPBuffer()) { - // LCOV_EXCL_START return FALSE;// error - // LCOV_EXCL_STOP } }; return TRUE; @@ -1314,9 +1274,7 @@ NABoolean ExSequenceTcb::addNewOLAPBuffer(NABoolean checkMemoryPressure) if ( tmpBuf == NULL || tmpBuf->getDataPointer() == NULL ) { - // LCOV_EXCL_START return FALSE; // no memory - // LCOV_EXCL_STOP } if (firstOLAPBuffer_== NULL) @@ -1360,17 +1318,13 @@ void ExSequenceTcb::initializeHistory() for (Int32 i = 0 ; i < minNumberOfOLAPBuffers_; i++) { if ( ! addNewOLAPBuffer( FALSE /* No Memory Pressure Check */ ) ) - // LCOV_EXCL_START ex_assert(0, "No memory for minimal OLAP window!"); - // LCOV_EXCL_STOP } } else { if (!shrinkOLAPBufferList()) - // LCOV_EXCL_START ex_assert(0,"initializeHistory-- can not shrink buffer list"); - // LCOV_EXCL_STOP } // Initialize all the settings needed for unbounded following (and overflow) @@ -1413,9 +1367,7 @@ void ExSequenceTcb::createCluster() // if quota, and it's less than avail memory, then use that lower figure if ( myTdb().memoryQuotaMB() > 0 && myTdb().memoryQuotaMB() * ONE_MEG < availableMemory ) - // LCOV_EXCL_START availableMemory = myTdb().memoryQuotaMB() * ONE_MEG ; - // LCOV_EXCL_STOP ULng32 minMemQuotaMB = myTdb().isPossibleMultipleCalls() ? myTdb().memoryQuotaMB() : 0 ; @@ -1477,14 +1429,12 @@ void ExSequenceTcb::createCluster() clusterDb_->setScratchIOVectorSize(myTdb().scratchIOVectorSize()); switch(myTdb().getOverFlowMode()) { - // LCOV_EXCL_START case SQLCLI_OFM_SSD_TYPE: clusterDb_->setScratchOverflowMode(SCRATCH_SSD); break; case SQLCLI_OFM_MMAP_TYPE: clusterDb_->setScratchOverflowMode(SCRATCH_MMAP); break; - // LCOV_EXCL_STOP default: case SQLCLI_OFM_DISK_TYPE: clusterDb_->setScratchOverflowMode(SCRATCH_DISK); @@ -1514,9 +1464,7 @@ void ExSequenceTcb::updateDiagsArea(ex_queue_entry * centry) { if (workAtp_->getDiagsArea()) { - // LCOV_EXCL_START workAtp_->getDiagsArea()->mergeAfter(*centry->getDiagsArea()); - // LCOV_EXCL_STOP } else { @@ -1527,7 +1475,6 @@ void ExSequenceTcb::updateDiagsArea(ex_queue_entry * centry) } } } -// LCOV_EXCL_START void ExSequenceTcb::updateDiagsArea( ExeErrorCode rc_) { ComDiagsArea *da = workAtp_->getDiagsArea(); @@ -1541,7 +1488,6 @@ void ExSequenceTcb::updateDiagsArea( ExeErrorCode rc_) *da << DgSqlCode(-rc_); } } -// LCOV_EXCL_STOP // // Constructor and destructor private state //
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ExVPJoin.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExVPJoin.cpp b/core/sql/executor/ExVPJoin.cpp index ff9caa6..201d4b1 100644 --- a/core/sql/executor/ExVPJoin.cpp +++ b/core/sql/executor/ExVPJoin.cpp @@ -41,7 +41,6 @@ // Exclude this code from coverage analysis since this feature is // obsolete and not used. -// LCOV_EXCL_START ex_tcb * ExVPJoinTdb::build(ex_globals * glob) { @@ -482,4 +481,3 @@ ex_tcb_private_state * ExVPJoinPrivateState::allocate_new(const ex_tcb * tcb) ExVPJoinPrivateState::~ExVPJoinPrivateState() {} -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ExVPJoin.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExVPJoin.h b/core/sql/executor/ExVPJoin.h index bbc7c80..334ded6 100644 --- a/core/sql/executor/ExVPJoin.h +++ b/core/sql/executor/ExVPJoin.h @@ -64,7 +64,6 @@ class ExVPJoinTcbPrivateState; // Exclude this code from coverage analysis since this feature is // obsolete and not used. -// LCOV_EXCL_START // ----------------------------------------------------------------------- // Classes defined in this file @@ -232,7 +231,6 @@ inline ex_expr * ExVPJoinTcb::filterPred() return vpJoinTdb().filterExpr_; } -// LCOV_EXCL_STOP #endif http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/HdfsLogger.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/HdfsLogger.h b/core/sql/executor/HdfsLogger.h index 760289f..a6652bc 100644 --- a/core/sql/executor/HdfsLogger.h +++ b/core/sql/executor/HdfsLogger.h @@ -100,7 +100,6 @@ private: /** * Exception thrown when an error in the program logic is found. */ -// LCOV_EXCL_START :rfi class QRLogicException : public QRException { public: @@ -124,6 +123,5 @@ class QRLogicException : public QRException {} }; //QRLogicException -// LCOV_EXCL_STOP #endif /* _QRLOGGER_H_ */ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/MdamRefList.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/MdamRefList.cpp b/core/sql/executor/MdamRefList.cpp index 60d8175..eee476c 100644 --- a/core/sql/executor/MdamRefList.cpp +++ b/core/sql/executor/MdamRefList.cpp @@ -58,7 +58,6 @@ enum {disjunctNumInitialValue = -1}; // Member functions for class MdamRefList // ***************************************************************************** -// LCOV_EXCL_START // this desctor is not called as the instance is part of MdamColumn class and // would be constructed and destructed together. //Destructor. @@ -71,10 +70,8 @@ MdamRefList::~MdamRefList() "MdamRefList::~MdamRefList() called for a non-empty reference list."); } -// LCOV_EXCL_STOP // end of excluding the destructor from coverage checking. -// LCOV_EXCL_START // this operator was designed for completeness but is not currently used // Compare two reference lists. If they are equal, return true. // Otherwise, return false. Comparision stops at first non-match. @@ -108,7 +105,6 @@ NABoolean MdamRefList::operator==(const MdamRefList & otherList) const return TRUE; } -// LCOV_EXCL_STOP // end of excluding this equal operator from coverage checking // Copy the entries from one reference list to another. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/MdamRefList.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/MdamRefList.h b/core/sql/executor/MdamRefList.h index cb2028c..3892549 100644 --- a/core/sql/executor/MdamRefList.h +++ b/core/sql/executor/MdamRefList.h @@ -79,11 +79,9 @@ class MdamRefList // Assignment operator is not supported. -// LCOV_EXCL_START // this operator was defined for completeness but is not currently used // Test for equality. NABoolean operator==(const MdamRefList & otherList) const; -// LCOV_EXCL_STOP // end of excluding this equal operator from coverage checking // Copy the entries from one reference list to another. @@ -150,7 +148,6 @@ inline MdamRefList::MdamRefList(const Int32 disjunctNum, insert(disjunctNum, mdamRefListEntryHeap); } -// LCOV_EXCL_START // this method is only called in the destruct, see MdamRefList.cpp for reason // Determine if the list is empty. inline NABoolean MdamRefList::isEmpty() const @@ -158,6 +155,5 @@ inline NABoolean MdamRefList::isEmpty() const return lastEntryPtr_ == 0; } -// LCOV_EXCL_STOP // end of excluding isEmpty from coverage checking #endif /* MDAMREFLIST_H */ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/cluster.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/cluster.cpp b/core/sql/executor/cluster.cpp index 0875a32..a8610c6 100644 --- a/core/sql/executor/cluster.cpp +++ b/core/sql/executor/cluster.cpp @@ -211,7 +211,7 @@ void HashBuffer::init(Cluster * cluster) { HashBuffer::~HashBuffer() { if (data_) { if ( ! cluster_ ) { - heap_->deallocateMemory(data_); // LCOV_EXCL_LINE + heap_->deallocateMemory(data_); return; } // NOTE: we do NOT ajust the memory usage statistics for the cluster, @@ -258,13 +258,11 @@ HashBuffer::~HashBuffer() { ///////////////////////////////////////////////////////////////////////////// -// LCOV_EXCL_START Bucket::Bucket() { init(); }; -// LCOV_EXCL_STOP void Bucket::init() { innerCluster_ = NULL; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/cluster.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/cluster.h b/core/sql/executor/cluster.h index e3b7b1b..c987002 100644 --- a/core/sql/executor/cluster.h +++ b/core/sql/executor/cluster.h @@ -508,7 +508,7 @@ inline void HashBufferSerial::setRowLength(HashRow *row, UInt32 len) { class Bucket { public: Bucket(); - ~Bucket() {}; // LCOV_EXCL_LINE + ~Bucket() {}; void init(); inline ULng32 getRowCount() const; inline Cluster * getInnerCluster () const; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_ex.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_ex.h b/core/sql/executor/ex_ex.h index eb3b164..421cb3c 100644 --- a/core/sql/executor/ex_ex.h +++ b/core/sql/executor/ex_ex.h @@ -52,7 +52,7 @@ void ex_log_ems( const char *f, Int32 l, const char * m); void assert_botch_longjmp( const char *f, int l, const char * m); -#define ex_assert(p, msg) if (!(p)) { assert_botch_abend( __FILE__ , __LINE__ , msg); }; // LCOV_EXCL_LINE +#define ex_assert(p, msg) if (!(p)) { assert_botch_abend( __FILE__ , __LINE__ , msg); }; class ex_expr; // to be defined http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_hash_grby.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_hash_grby.cpp b/core/sql/executor/ex_hash_grby.cpp index 8ce966c..4c07b60 100644 --- a/core/sql/executor/ex_hash_grby.cpp +++ b/core/sql/executor/ex_hash_grby.cpp @@ -217,7 +217,6 @@ ex_hash_grby_tcb::ex_hash_grby_tcb(const ex_hash_grby_tdb & hash_grby_tdb, } // Allocate an ExTrieTable for rows that map directly to groups using // bitMux fast mapping. - // LCOV_EXCL_START if (bitMuxExpr_) { // Try to get about 1Mb of memory for the Trie table. @@ -268,7 +267,6 @@ ex_hash_grby_tcb::ex_hash_grby_tcb(const ex_hash_grby_tdb & hash_grby_tdb, // if(bitMuxExpr_ && !hbAggrExpr_ && !hashExpr_) bitMuxExpr_ = NULL; - // LCOV_EXCL_STOP // get the queue that child use to communicate with me childQueue_ = childTcb_->getParentQueue(); @@ -276,7 +274,7 @@ ex_hash_grby_tcb::ex_hash_grby_tcb(const ex_hash_grby_tdb & hash_grby_tdb, // Allocate the queues to communicate with parent (no pstate needed) allocateParentQueues(parentQueue_,FALSE); - // Now, fixup the expressions // LCOV_EXCL_START + // Now, fixup the expressions // if (hashExpr_) (void) hashExpr_->fixup(0, getExpressionMode(), this, @@ -318,7 +316,6 @@ ex_hash_grby_tcb::ex_hash_grby_tcb(const ex_hash_grby_tdb & hash_grby_tdb, if (ofSearchExpr_) (void) ofSearchExpr_->fixup(0, getExpressionMode(), this, space_, heap_, glob->computeSpace(), glob); - // LCOV_EXCL_STOP // Allocate the ATP's that are used internally in the work // methods. // @@ -351,7 +348,6 @@ ex_hash_grby_tcb::ex_hash_grby_tcb(const ex_hash_grby_tdb & hash_grby_tdb, /////////////////////////////////////////////////////////////////////////////// // Destructor for hash_grby_tcb -// // LCOV_EXCL_START ex_hash_grby_tcb::~ex_hash_grby_tcb() { delete parentQueue_.up; @@ -400,7 +396,6 @@ void ex_hash_grby_tcb::freeResources() { if(bitMuxBuffer_) NADELETEBASIC(bitMuxBuffer_, space_); bitMuxBuffer_ = NULL; }; -// LCOV_EXCL_STOP void ex_hash_grby_tcb::registerSubtasks() { @@ -636,7 +631,7 @@ short ex_hash_grby_tcb::work() { } } break; - case HASH_GRBY_ERROR: { // LCOV_EXCL_START + case HASH_GRBY_ERROR: { // make sure that we have a free slot in the parent's up queue if (parentQueue_.up->isFull()) { return WORK_OK; @@ -674,7 +669,7 @@ short ex_hash_grby_tcb::work() { downParentEntry->setDiagsArea(diags); workHandleError(downParentEntry->getAtp()); } break; - }; // LCOV_EXCL_STOP + }; }; }; @@ -784,11 +779,11 @@ void ex_hash_grby_tcb::workInitialize() { // Default to 100 MB, minimum setting 10 MB // availableMemory = hashGrbyTdb().partialGrbyMemoryMB() * ONE_MEG ; - if(availableMemory == 0) { // LCOV_EXCL_START + if(availableMemory == 0) { availableMemory = 100 * ONE_MEG; } else if(availableMemory < 10 * ONE_MEG) { availableMemory = 10 * ONE_MEG; - } // LCOV_EXCL_STOP + } // reset the counter for every run. partialGroupbyMissCounter_ = 0; @@ -853,12 +848,12 @@ void ex_hash_grby_tcb::workInitialize() { getStatsEntry() ); - if ( !clusterDb_ || rc_ != EXE_OK ) { // LCOV_EXCL_START + if ( !clusterDb_ || rc_ != EXE_OK ) { if ( !clusterDb_ ) rc_ = EXE_NO_MEM_TO_EXEC; // new() couldn't allocate else delete clusterDb_; setState(HASH_GRBY_ERROR); return; - }; // LCOV_EXCL_STOP + }; clusterDb_->setScratchIOVectorSize(hashGrbyTdb().scratchIOVectorSize()); switch(hashGrbyTdb().getOverFlowMode()) @@ -895,13 +890,13 @@ void ex_hash_grby_tcb::workInitialize() { cluster, &rc_); - if ( !cluster || rc_ != EXE_OK ) { // LCOV_EXCL_START + if ( !cluster || rc_ != EXE_OK ) { // we could not allocate the Cluster if ( !cluster ) rc_ = EXE_NO_MEM_TO_EXEC; else delete cluster; setState(HASH_GRBY_ERROR); return; - }; // LCOV_EXCL_STOP + }; bucketIdx += bucketsPerCluster; }; @@ -1154,10 +1149,10 @@ void ex_hash_grby_tcb::workReadChild() { else { // we couldn't insert the row. If we got an error, handle it. // EXE_NO_MEM_TO_EXEC is not an error - if (rc_ && !(rc_ == EXE_NO_MEM_TO_EXEC)) { // LCOV_EXCL_START + if (rc_ && !(rc_ == EXE_NO_MEM_TO_EXEC)) { setState(HASH_GRBY_ERROR); return; - }; // LCOV_EXCL_STOP + }; // we ran out of memory. Handle this situation. In case of a // partial grouping we return the row as a new group to the parent. @@ -1300,7 +1295,6 @@ void ex_hash_grby_tcb::workReadChild() { // workReadChildBitMux // -// LCOV_EXCL_START Int32 ex_hash_grby_tcb::workReadChildBitMux() { ex_queue_entry * childEntry; ex_queue_entry * upParentEntry = parentQueue_.up->getTailEntry(); @@ -1415,7 +1409,6 @@ Int32 ex_hash_grby_tcb::workReadChildBitMux() { // return 0; } -// LCOV_EXCL_STOP ///////////////////////////////////////////////////////////////////////////// // read rows from the overflow buffer and aggregate them into the http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_hash_grby.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_hash_grby.h b/core/sql/executor/ex_hash_grby.h index ace7ca5..ce486ed 100644 --- a/core/sql/executor/ex_hash_grby.h +++ b/core/sql/executor/ex_hash_grby.h @@ -82,7 +82,7 @@ public: {} virtual ~ex_hash_grby_tdb() - {} // LCOV_EXCL_LINE + {} // --------------------------------------------------------------------- // Build a TCB for this TDB. Redefined in the Executor project. @@ -330,12 +330,12 @@ public: Initial Revision. *****************************************************************************/ inline const ex_tcb* ex_hash_grby_tcb::getChild(Int32 pos) const { - ex_assert((pos >= 0), ""); // LCOV_EXCL_START + ex_assert((pos >= 0), ""); if (pos == 0) return childTcb_; else return NULL; -} // LCOV_EXCL_STOP +} /////////////////////////////////////////////////////////////////////////// // http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_mdam.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_mdam.cpp b/core/sql/executor/ex_mdam.cpp index 9f6e35a..770a09e 100644 --- a/core/sql/executor/ex_mdam.cpp +++ b/core/sql/executor/ex_mdam.cpp @@ -213,12 +213,10 @@ void MdamColumn::setNextColumn(MdamColumn *next) next_ = next; } -// LCOV_EXCL_START MdamIntervalList & MdamColumn::getIntervalList() { return intervals_; } -// LCOV_EXCL_STOP NABoolean MdamColumn::initNextValue() { @@ -734,7 +732,7 @@ while ((predIterator.positionToNextOr(¤tPred_)) && } default: { - ex_assert(0,"Invalid predicate type"); //LCOV_EXCL_LINE + ex_assert(0,"Invalid predicate type"); break; } } @@ -1068,7 +1066,6 @@ keyRangeEx::getNextKeyRangeReturnType keyMdamEx::getNextKeyRange char *ektarget = ekData_.getDataPointer(); ULng32 keyLength = getGenInfo().getKeyLength(); - // LCOV_EXCL_START if (getGenInfo().getKeytag() > 0) { unsigned short keytag = getGenInfo().getKeytag(); @@ -1078,7 +1075,6 @@ keyRangeEx::getNextKeyRangeReturnType keyMdamEx::getNextKeyRange ektarget += sizeof(short); keyLength -= sizeof(short); } - // LCOV_EXCL_STOP if (complementKeysBeforeReturning_) { @@ -1189,7 +1185,7 @@ keyRangeEx::getNextKeyRangeReturnType keyMdamEx::getNextKeyRange } default: { - ex_assert(0,"keyMdamEx::getNextKeyRange() invalid getNextValue rc"); // LCOV_EXCL_LINE + ex_assert(0,"keyMdamEx::getNextKeyRange() invalid getNextValue rc"); break; } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_queue.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_queue.cpp b/core/sql/executor/ex_queue.cpp index 3bd10d3..1ac4cb0 100644 --- a/core/sql/executor/ex_queue.cpp +++ b/core/sql/executor/ex_queue.cpp @@ -212,7 +212,6 @@ void ex_queue::removeHead() } // ex_queue::removeHead() #endif -// LCOV_EXCL_START //soln 10-040111-2308 start void ex_queue::deleteHeadEntry() { @@ -256,7 +255,6 @@ void ex_queue::deleteHeadEntry() } // ex_queue::deleteHeadEntry() //soln 10-040111-2308 end -// LCOV_EXCL_STOP void ex_queue_entry::passAtp(const ex_queue_entry *from) { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_root.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_root.cpp b/core/sql/executor/ex_root.cpp index 145f220..1f8b2b4 100644 --- a/core/sql/executor/ex_root.cpp +++ b/core/sql/executor/ex_root.cpp @@ -724,7 +724,6 @@ Int32 ex_root_tcb::execute(CliGlobals *cliGlobals, } #ifdef _DEBUG -// LCOV_EXCL_START // Do not need to cover debug code since customers and QA do no receive it. char *testCancelFreq = getenv("TEST_ERROR_AT_QUEUE"); if (testCancelFreq) @@ -741,7 +740,6 @@ Int32 ex_root_tcb::execute(CliGlobals *cliGlobals, } getGlobals()->setInjectErrorAtQueue(freq); } -// LCOV_EXCL_STOP else getGlobals()->setInjectErrorAtQueue(0); #endif @@ -913,7 +911,6 @@ Int32 ex_root_tcb::execute(CliGlobals *cliGlobals, // This code block must be placed right before insert(). // ------------------------------------------------------------ CancelState old = master_glob->setCancelState(CLI_CANCEL_TCB_READY); -// LCOV_EXCL_START if (old == CLI_CANCEL_REQUESTED) { // Don't bother to continue if async cancel has been requested. @@ -925,7 +922,6 @@ Int32 ex_root_tcb::execute(CliGlobals *cliGlobals, populateCancelDiags(*diagsArea); return -1; } -// LCOV_EXCL_STOP // ++Trigger, // @@ -1862,7 +1858,6 @@ Int32 ex_root_tcb::fetch(CliGlobals *cliGlobals, } // $$$ no-wait CLI prototype VV -// LCOV_EXCL_START // Obsolete in SQ. if (timeLimit == 0) { @@ -1872,7 +1867,6 @@ Int32 ex_root_tcb::fetch(CliGlobals *cliGlobals, // diagnostics in this way... return NOT_FINISHED; } -// LCOV_EXCL_STOP // $$$ no-wait CLI prototype ^^ @@ -1889,7 +1883,6 @@ Int32 ex_root_tcb::fetch(CliGlobals *cliGlobals, schedRetcode = glob->getScheduler()->work(prevWaitTime); #ifdef _DEBUG -// LCOV_EXCL_START // We do not need coverage for DEBUG builds since QA or customers do no recieve. if (earliestTimeToCancel && getenv("TEST_CANCEL_ABORT")) { @@ -1901,7 +1894,6 @@ Int32 ex_root_tcb::fetch(CliGlobals *cliGlobals, return -1; } #endif -// LCOV_EXCL_STOP if (schedRetcode == WORK_BAD_ERROR) { @@ -2906,14 +2898,12 @@ void ex_root_tcb::deregisterCB() // See comments around allowUnitTestSuspend above. This code has // been manually unit tested, and it too difficult and costly to // test in an automated script. - // LCOV_EXCL_START statsGlobals->releaseStatsSemaphore(cliGlobals->getSemId(), cliGlobals->myPin()); DELAY(300); int error = statsGlobals->getStatsSemaphore(cliGlobals->getSemId(), cliGlobals->myPin()); - // LCOV_EXCL_STOP } // Now we have the semaphore, and the query is not suspended. Quick http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_sort.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_sort.cpp b/core/sql/executor/ex_sort.cpp index a6bac14..5280d0f 100644 --- a/core/sql/executor/ex_sort.cpp +++ b/core/sql/executor/ex_sort.cpp @@ -585,7 +585,6 @@ ex_tcb_private_state * ExSortTcb::allocatePstates( // the sort subsystem. //////////////////////////////////////////////////////////////////////// -// LCOV_EXCL_START void ExSortTcb::createSortDiags() { ExExeStmtGlobals* exe_glob = getGlobals()->castToExExeStmtGlobals(); @@ -623,12 +622,10 @@ void ExSortTcb::createSortDiags() sortDiag_->incrRefCount(); } -// LCOV_EXCL_STOP //////////////////////////////////////////////////////////////////////// // processSortError() // #pragma nowarn(262) // warning elimination -// LCOV_EXCL_START NABoolean ExSortTcb::processSortError(ex_queue_entry *pentry_down, queue_index parentIndex, queue_index downIndex) @@ -656,7 +653,6 @@ NABoolean ExSortTcb::processSortError(ex_queue_entry *pentry_down, return TRUE; } -// LCOV_EXCL_STOP #pragma warn(262) // warning elimination short ExSortTcb::workStatus(short workRC) @@ -673,20 +669,16 @@ short ExSortTcb::workStatus(short workRC) // ----------------------------------------------------------------------- // Generic work procedure should never be called // ----------------------------------------------------------------------- -// LCOV_EXCL_START short ExSortTcb::work() { ex_assert(0,"Should never reach ExSortTcb::work()"); return WORK_BAD_ERROR; } -// LCOV_EXCL_STOP short ExSortTcb::workDown() { // if no parent request, return if (qparent_.down->isEmpty()) -// LCOV_EXCL_START return WORK_OK; -// LCOV_EXCL_STOP queue_index tail = qparent_.down->getTailIndex(); @@ -778,18 +770,14 @@ short ExSortTcb::workUp() switch (pstate.step_) { case ExSortTcb::SORT_EMPTY: - // LCOV_EXCL_START ex_assert(0,"Should never reach workUp with this state"); return WORK_OK; - // LCOV_EXCL_STOP case ExSortTcb::SORT_PREP: { if ( sortDiag_ != NULL ) { - // LCOV_EXCL_START sortDiag_->decrRefCount(); sortDiag_ = NULL; // reset - // LCOV_EXCL_STOP } if (bmoStats_) bmoStats_->setBmoPhase(SORT_PHASE_END-SORT_PREP_PHASE); @@ -801,11 +789,9 @@ short ExSortTcb::workUp() if (sortUtil_->sortInitialize(*sortCfg_, topNCount) != SORT_SUCCESS) { - // LCOV_EXCL_START createSortDiags(); pstate.step_ = ExSortTcb::SORT_ERROR; break; - // LCOV_EXCL_STOP } pstate.step_ = ExSortTcb::SORT_SEND; @@ -814,12 +800,10 @@ short ExSortTcb::workUp() case ExSortTcb::RESTART_PARTIAL_SORT: { - // LCOV_EXCL_START pstate.noOverflow_ = TRUE; sortPartiallyComplete_ = FALSE; sortUtil_->sortEnd(); pstate.step_ = ExSortTcb::SORT_PREP; - // LCOV_EXCL_STOP } break; @@ -827,13 +811,11 @@ short ExSortTcb::workUp() { if (request == ex_queue::GET_NOMORE) { - // LCOV_EXCL_START // Parent canceled, inform child and consume input rows qchild_.down->cancelRequestWithParentIndex( qparent_.down->getHeadIndex()); pstate.step_ = ExSortTcb::SORT_CANCELED; break; - // LCOV_EXCL_STOP } // if nothing returned from child. Get outta here. @@ -853,9 +835,7 @@ short ExSortTcb::workUp() pstate.allocatedTuppDesc_, pstate.noOverflow_, workRC); if (rc == 1) - // LCOV_EXCL_START return workRC; - // LCOV_EXCL_STOP // consume the child row in all cases except when // sort is partially complete. sortPartiallyComplete is TRUE @@ -881,12 +861,10 @@ short ExSortTcb::workUp() { case ex_queue::Q_OK_MMORE: case ex_queue::Q_SQLERROR: - // LCOV_EXCL_START { qchild_.up->removeHead(); } break; - // LCOV_EXCL_STOP case ex_queue::Q_NO_DATA: { qchild_.up->removeHead(); @@ -897,9 +875,7 @@ short ExSortTcb::workUp() case ex_queue::Q_INVALID: { - // LCOV_EXCL_START ex_assert(0, "ExSortTcb::work() invalid state returned by child"); - // LCOV_EXCL_STOP }; break; } } @@ -912,15 +888,12 @@ short ExSortTcb::workUp() // Inform child to cancel immediately. This may be called // several times if the parent up queue remains full, // but it has no unwanted side effect. - // LCOV_EXCL_START qchild_.down->cancelRequestWithParentIndex( qparent_.down->getHeadIndex()); - // LCOV_EXCL_STOP // continue } case ExSortTcb::SORT_ERROR_ON_RECEIVE: { - // LCOV_EXCL_START if (qparent_.up->isFull()){ return workStatus(WORK_OK); // parent queue is full. Just return } @@ -948,7 +921,6 @@ short ExSortTcb::workUp() pstate.step_ = ExSortTcb::SORT_DONE; } break; - // LCOV_EXCL_STOP case ExSortTcb::SORT_RECEIVE: { // check if we've got room in the up queue @@ -980,9 +952,7 @@ short ExSortTcb::workUp() pstate.allocatedTuppDesc_, pstate.noOverflow_, workRC); if (rc == 1) - // LCOV_EXCL_START return workRC; - // LCOV_EXCL_STOP } break; @@ -991,9 +961,7 @@ short ExSortTcb::workUp() { // check if we've got room in the parent up queue if (qparent_.up->isFull()){ - // LCOV_EXCL_START return workStatus(WORK_OK); // parent queue is full. Just return - // LCOV_EXCL_STOP } rc = done(TRUE, // send Q_NO_DATA @@ -1121,9 +1089,7 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, { if (sortTdb().sortOptions_->dontOverflow()) { - // LCOV_EXCL_START sortSendPool_->addBuffer(sortTdb().bufferSize_); - // LCOV_EXCL_STOP } // add more buffers if there is more space //available in the pool. @@ -1143,7 +1109,6 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, } else { - // LCOV_EXCL_START // Ask sort to overflow. rc = sortUtil_->sortClientOutOfMem() ; if (rc == SORT_IO_IN_PROGRESS) @@ -1158,7 +1123,6 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, { createSortDiags(); step = ExSortTcb::SORT_ERROR; - // LCOV_EXCL_STOP break; } } @@ -1195,7 +1159,6 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, ex_assert(0,"Must get a tuple from pool as they must be available"); step = ExSortTcb::SORT_ERROR; break; - // LCOV_EXCL_STOP } } @@ -1203,11 +1166,9 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, } else { - // LCOV_EXCL_START // If the tuple was already allocated td = allocatedTuppDesc; allocatedTuppDesc = NULL; - // LCOV_EXCL_STOP } //reaching here td is not NULL. ex_expr::exp_return_type retCode = ex_expr::EXPR_OK; @@ -1296,7 +1257,6 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, if (qparent_.up->isFull()){ return WORK_OK; - // LCOV_EXCL_STOP } ex_queue_entry *upEntry = qparent_.up->getTailEntry(); @@ -1304,9 +1264,7 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, upEntry->copyAtp(srcEntry); if (sortFromTop && (sortTdb().isNonFatalErrorTolerated())) - // LCOV_EXCL_START upEntry->upState.status = ex_queue::Q_OK_MMORE; // denotes nonfatal error - // LCOV_EXCL_STOP else upEntry->upState.status = ex_queue::Q_SQLERROR; @@ -1334,7 +1292,6 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, // this rec for partialKey comparison. if(sortTdb().partialSort()) - // LCOV_EXCL_START // Partial sort is disabled and not active because it has issues { if(!setCompareTd_) @@ -1385,14 +1342,12 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, } if (bmoStats_) bmoStats_->incInterimRowCount(); - // LCOV_EXCL_STOP rc = sortUtil_->sortSend(dataPointer, newRecLen, td) ; if (rc == SORT_IO_IN_PROGRESS) { - // LCOV_EXCL_START // Don't consume the child row - just return // save the tuple descriptor that we used allocatedTuppDesc = td; @@ -1401,19 +1356,16 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, // IPC and will schedule this operator again for next round workRC = WORK_CALL_AGAIN; return workStatus(1); - // LCOV_EXCL_STOP } if (rc != SORT_SUCCESS) { // The tupp_descriptors already sent to sortUtil_ // will be cleaned up via sortUtil_->sortEnd(), but // this one must be freed now. - // LCOV_EXCL_START td->setReferenceCount(0); createSortDiags(); step = ExSortTcb::SORT_ERROR; break; - // LCOV_EXCL_STOP } } break; @@ -1423,20 +1375,16 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, if(setCompareTd_) { // dereference setCompareTd_ - // LCOV_EXCL_START ReleaseTupp(setCompareTd_); setCompareTd_ = NULL; - // LCOV_EXCL_STOP } sortPartiallyComplete_ = FALSE; if (sortUtil_->sortSendEnd(noOverflow) != SORT_SUCCESS) { - // LCOV_EXCL_START createSortDiags(); step = ExSortTcb::SORT_ERROR_ON_RECEIVE; break; - // LCOV_EXCL_STOP } // ensure that the rows affected are returned @@ -1445,9 +1393,7 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, { if (sortDiag_) { - // LCOV_EXCL_START sortDiag_->mergeAfter(*da); - // LCOV_EXCL_STOP } else { @@ -1464,10 +1410,8 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, case ex_queue::Q_SQLERROR: { if (qparent_.up->isFull()){ - // LCOV_EXCL_START workRC = WORK_OK; return workStatus(1); - // LCOV_EXCL_STOP } ex_queue_entry *upEntry = qparent_.up->getTailEntry(); @@ -1491,10 +1435,8 @@ short ExSortTcb::sortSend(ex_queue_entry * srcEntry, break; case ex_queue::Q_INVALID: - // LCOV_EXCL_START ex_assert(0,"ExSortTcb::work() Invalid state returned by child"); break; - // LCOV_EXCL_STOP } // switch srcStatus @@ -1555,11 +1497,9 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, { // no more space in the pool to allocate sorted rows from. //Return and come back later when some space gets freed up. - // LCOV_EXCL_START workRC = WORK_POOL_BLOCKED; return workStatus(1); } - // LCOV_EXCL_STOP } tgtEntry->getAtp()->getTupp(sortTdb().tuppIndex_) = td; ReleaseTupp(td); @@ -1568,10 +1508,8 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, } else { - // LCOV_EXCL_START td = allocatedTuppDesc; allocatedTuppDesc = NULL; - // LCOV_EXCL_STOP } char *dataPointer = td->getTupleAddress(); @@ -1586,7 +1524,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, // partialSortPool_. if(sortTdb().partialSort()) { - // LCOV_EXCL_START if (!allocatedTuppDesc) { if (pentry_down) @@ -1609,7 +1546,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, receiveTd = allocatedTuppDesc; allocatedTuppDesc = NULL; } - // LCOV_EXCL_STOP } else if (pentry_down) tgtEntry->copyAtp(pentry_down); @@ -1624,11 +1560,9 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, td->setReferenceCount(0); if(sortTdb().partialSort()) { - // LCOV_EXCL_START // In the case of partial sort, we need to copy // the record into sortPool directly. memcpy(receiveTd->getTupleAddress(), td->getTupleAddress(), reclen); - // LCOV_EXCL_STOP } else tgtEntry->getAtp()->getTupp(sortTdb().tuppIndex_) = td; @@ -1637,7 +1571,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, if (rc == SORT_IO_IN_PROGRESS) { - // LCOV_EXCL_START if (noOverflow == FALSE) // Tupp descriptor allocated, remember it allocatedTuppDesc = td; @@ -1647,7 +1580,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, allocatedTuppDesc = receiveTd; receiveTd = NULL; } - // LCOV_EXCL_STOP // Don't consume the child row - just return // By returing work_call_again, scheduler will not give control back to // IPC and will schedule this operator again for next round @@ -1657,7 +1589,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, } if (rc != SORT_SUCCESS) { - // LCOV_EXCL_START // error returned createSortDiags(); if(sortPartiallyComplete_) @@ -1670,7 +1601,6 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, receiveTd = NULL; } return 0; - // LCOV_EXCL_STOP } else { @@ -1749,11 +1679,9 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, // of the child row reads. if(sortPartiallyComplete_) { - // LCOV_EXCL_START qchild_.down->cancelRequestWithParentIndex( qparent_.down->getHeadIndex()); step = ExSortTcb::SORT_CANCELED; - // LCOV_EXCL_STOP } else step = ExSortTcb::SORT_DONE; @@ -1776,17 +1704,13 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, // EOF if(receiveTd) { - // LCOV_EXCL_START tgtEntry->getAtp()->getTupp(sortTdb().tuppIndex_).release(); receiveTd = NULL; - // LCOV_EXCL_STOP } if(sortPartiallyComplete_) { - // LCOV_EXCL_START step = ExSortTcb::RESTART_PARTIAL_SORT; - // LCOV_EXCL_STOP } else { @@ -1815,13 +1739,11 @@ short ExSortTcb::sortReceive(ex_queue_entry * pentry_down, if (bmoStats_ == NULL && getStatsEntry()->castToExMeasStats()) { - // LCOV_EXCL_START getStatsEntry()->castToExMeasStats()->incNumSorts(1); Int64 elapsedTime; elapsedTime = s.getStatElapsedTime(); getStatsEntry()->castToExMeasStats()->incSortElapsedTime(elapsedTime); - // LCOV_EXCL_STOP } } @@ -1855,9 +1777,7 @@ short ExSortTcb::done( if (pUPda == NULL) pUPda = ComDiagsArea::allocate(this->getGlobals()->getDefaultHeap()); else - // LCOV_EXCL_START pUPda->incrRefCount(); - // LCOV_EXCL_STOP pUPda->mergeAfter(*sortDiag_); pentry->setDiagsArea (pUPda); @@ -1873,11 +1793,9 @@ short ExSortTcb::done( sortUtil_->sortEnd(); if(setCompareTd_) { - // LCOV_EXCL_START // dereference setCompareTd_ ReleaseTupp(setCompareTd_); setCompareTd_ = NULL; - // LCOV_EXCL_STOP } sortPartiallyComplete_ = FALSE; @@ -1900,10 +1818,8 @@ short ExSortTcb::cancel() = *((ExSortPrivateState *) pentry->pstate); if (pstate.allocatedTuppDesc_) { - // LCOV_EXCL_START ReleaseTupp(pstate.allocatedTuppDesc_); pstate.allocatedTuppDesc_ = NULL; - // LCOV_EXCL_STOP } switch (pstate.step_) @@ -1912,11 +1828,9 @@ short ExSortTcb::cancel() // Nothing is in the down queue yet for this request, but parent // does expect a Q_NO_DATA so just change pstate.step_ to // SORT_DONE; - // LCOV_EXCL_START pstate.step_ = SORT_DONE; ioEventHandler_->schedule(); //schedule workUp to reply break; - // LCOV_EXCL_STOP case SORT_PREP: case SORT_SEND: // Request has been sent to child, so cancel and discard child @@ -1927,26 +1841,20 @@ short ExSortTcb::cancel() case SORT_ERROR: // Request-to-child still pending, so cancel and discard child // responses. - // LCOV_EXCL_START qchild_.down->cancelRequestWithParentIndex(pindex); // The parent is not interested to process error, go to cancel. pstate.step_ = ExSortTcb::SORT_CANCELED; break; - // LCOV_EXCL_STOP case SORT_RECEIVE: if(sortPartiallyComplete_) { - // LCOV_EXCL_START qchild_.down->cancelRequestWithParentIndex(pindex); pstate.step_ = ExSortTcb::SORT_CANCELED; - // LCOV_EXCL_STOP } else // Child has returned Q_NO_DATA and entry pop'd from child up queue. - // LCOV_EXCL_START pstate.step_ = SORT_DONE; break; - // LCOV_EXCL_STOP case SORT_ERROR_ON_RECEIVE: // Child has returned Q_NO_DATA and entry pop'd from child up queue. // The parent is not interested to process error, go to done. @@ -1976,27 +1884,23 @@ ExSortPrivateState::ExSortPrivateState() step_ = ExSortTcb::SORT_EMPTY; noOverflow_ = TRUE; } -// LCOV_EXCL_START ExSortPrivateState::~ExSortPrivateState() { if (allocatedTuppDesc_) ReleaseTupp(allocatedTuppDesc_); }; -// LCOV_EXCL_STOP void ReleaseTupp(void * td) { #pragma nowarn(1506) // warning elimination ((tupp_descriptor *)td)->setReferenceCount(((tupp_descriptor *)td)->getReferenceCount() - 1); #pragma warn(1506) // warning elimination } -// LCOV_EXCL_START void CaptureTupp(void * td) { #pragma nowarn(1506) // warning elimination ((tupp_descriptor *)td)->setReferenceCount(((tupp_descriptor *)td)->getReferenceCount() + 1); #pragma warn(1506) // warning elimination } -// LCOV_EXCL_STOP //////////////////////////////////////////////////////////////////////////// // ExSortFromTopTcb: input is from parent, output is to child //////////////////////////////////////////////////////////////////////////// @@ -2071,9 +1975,7 @@ short ExSortFromTopTcb::work() { if (qparent_.down->isEmpty()) { - // LCOV_EXCL_START return workStatus(WORK_OK); - // LCOV_EXCL_STOP } pentry_down = qparent_.down->getHeadEntry(); @@ -2088,9 +1990,7 @@ short ExSortFromTopTcb::work() eodToChild_ = FALSE; if (pentry_down->downState.request == ex_queue::GET_EOD) - // LCOV_EXCL_START step_ = ExSortTcb::SORT_DONE_WITH_QND; - // LCOV_EXCL_STOP else step_ = ExSortTcb::SORT_PREP; } @@ -2100,19 +2000,15 @@ short ExSortFromTopTcb::work() { if ( sortDiag_ != NULL ) { - // LCOV_EXCL_START sortDiag_->decrRefCount(); sortDiag_ = NULL; // reset - // LCOV_EXCL_STOP } if (sortUtil_->sortInitialize(*sortCfg_, 0) != SORT_SUCCESS) { - // LCOV_EXCL_START createSortDiags(); step_ = ExSortTcb::SORT_ERROR; break; - // LCOV_EXCL_STOP } step_ = ExSortTcb::SORT_SEND; @@ -2212,9 +2108,7 @@ short ExSortFromTopTcb::work() allocatedTuppDesc_, noOverflow_, workRC); if (rc == 1) - // LCOV_EXCL_START return workStatus(workRC); - // LCOV_EXCL_STOP if (step_ == ExSortTcb::SORT_DONE) { // All sorted rows have been sent to the child. @@ -2298,7 +2192,6 @@ short ExSortFromTopTcb::work() case ex_queue::Q_SQLERROR: { - // LCOV_EXCL_START ex_queue_entry *pentry = qparent_.up->getTailEntry(); pentry->copyAtp(centry); @@ -2313,7 +2206,6 @@ short ExSortFromTopTcb::work() step_ = ExSortTcb::SORT_CANCEL_CHILD; } break; - // LCOV_EXCL_STOP case ex_queue::Q_OK_MMORE: { @@ -2332,9 +2224,7 @@ short ExSortFromTopTcb::work() default: { - // LCOV_EXCL_START ex_assert(0, "ExSortFromTopTcb::work() Error state Q_OK_MMORE from child"); - // LCOV_EXCL_STOP } break; @@ -2347,7 +2237,6 @@ short ExSortFromTopTcb::work() //SORT_ERROR can occur when processing rows before sending //any row to child. In other words,pentry_down->downState.request //is not received ex_queue::GET_EOD yet. - // LCOV_EXCL_START ex_assert(numSortedRows_ == 0, "ExSortFromTopTcb::work() Sort Error when row to child"); if (qparent_.up->isFull()) @@ -2366,14 +2255,12 @@ short ExSortFromTopTcb::work() } break; - // LCOV_EXCL_STOP case ExSortTcb::SORT_ERROR_ON_RECEIVE: { // this error is returned during sortReceive phase // or at the end of sortSend when all rows have been sent // to child. - // LCOV_EXCL_START if (qparent_.up->isFull()) { return workStatus(WORK_OK); // parent queue is full. @@ -2387,7 +2274,6 @@ short ExSortFromTopTcb::work() step_ = ExSortTcb::SORT_CANCEL_CHILD; } break; - // LCOV_EXCL_STOP case ExSortTcb::SORT_CANCEL_CHILD: { // this state is reached when child returns an error @@ -2404,7 +2290,6 @@ short ExSortFromTopTcb::work() //In this case, just send a QND. This is achived by stepping //to ExSortTcb::SORT_DONE_WITH_QND state. Cleanup is done in //ExSortTcb::SORT_DONE_WITH_QND state. - // LCOV_EXCL_START if(numSortedRows_ == 0) { step_ = ExSortTcb::SORT_DONE_WITH_QND; @@ -2453,7 +2338,6 @@ short ExSortFromTopTcb::work() } } break; - // LCOV_EXCL_STOP case ExSortTcb::SORT_DONE_WITH_QND: { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_split_bottom.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_split_bottom.cpp b/core/sql/executor/ex_split_bottom.cpp index b53b91c..77324f3 100644 --- a/core/sql/executor/ex_split_bottom.cpp +++ b/core/sql/executor/ex_split_bottom.cpp @@ -804,7 +804,6 @@ ExWorkProcRetcode ex_split_bottom_tcb::work() // should be logged. On other platforms we skip the // the core-file and Seapilot event. The Seaquest // logic is encapsulated in ComDiags.cpp and ComRtUtils.cpp. - // LCOV_EXCL_START // I tested this code with regress/executor/TEST082. // However, that test is disabled. for (CollIndex i = 0; i < sendNodes_.entries(); i++) @@ -835,7 +834,6 @@ ExWorkProcRetcode ex_split_bottom_tcb::work() } } break; - // LCOV_EXCL_STOP } case ComTdbSplitBottom::TEST_LOG4CXX: { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_tcb_private.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_tcb_private.cpp b/core/sql/executor/ex_tcb_private.cpp index 388c874..fcdbaa7 100644 --- a/core/sql/executor/ex_tcb_private.cpp +++ b/core/sql/executor/ex_tcb_private.cpp @@ -50,7 +50,6 @@ ex_tcb_private_state::ex_tcb_private_state():errorCode_(0){} -// LCOV_EXCL_START ex_tcb_private_state::~ex_tcb_private_state(){} ex_tcb_private_state * ex_tcb_private_state::allocate_new(const ex_tcb * /*tcb*/) @@ -58,4 +57,3 @@ ex_tcb_private_state * ex_tcb_private_state::allocate_new(const ex_tcb * /*tcb*/ ex_assert(0, "Can't have private state for base tcb"); return (ex_tcb_private_state *) 0; } -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_timeout.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_timeout.cpp b/core/sql/executor/ex_timeout.cpp index 7df0f4c..2565450 100644 --- a/core/sql/executor/ex_timeout.cpp +++ b/core/sql/executor/ex_timeout.cpp @@ -181,7 +181,6 @@ short ExTimeoutTcb::work() #if _DEBUG // For debugging only !!!!! if ( getenv("DEBUG_TIMEOUT") ) { - // LCOV_EXCL_START ComDiagsArea* diagsArea = ComDiagsArea::allocate (getGlobals()->getDefaultHeap()); char errmsg[120]; @@ -214,7 +213,6 @@ short ExTimeoutTcb::work() diagsArea, (ExeErrorCode) -3066 ); } // end of debugging section else - // LCOV_EXCL_STOP #endif if ( goodTimeoutValue ) { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_timeout.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_timeout.h b/core/sql/executor/ex_timeout.h index 8c5d95c..a4d867e 100644 --- a/core/sql/executor/ex_timeout.h +++ b/core/sql/executor/ex_timeout.h @@ -133,10 +133,10 @@ public: inline Int32 orderedQueueProtocol() const{return ((const ExTimeoutTdb &)tdb).orderedQueueProtocol();} - void freeResources(){}; // LCOV_EXCL_LINE + void freeResources(){}; Int32 numChildren() const { return 0; } - const ex_tcb* getChild(Int32 /*pos*/) const { return 0; } // LCOV_EXCL_LINE + const ex_tcb* getChild(Int32 /*pos*/) const { return 0; } private: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_transaction.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_transaction.cpp b/core/sql/executor/ex_transaction.cpp index 437170b..083b202 100644 --- a/core/sql/executor/ex_transaction.cpp +++ b/core/sql/executor/ex_transaction.cpp @@ -172,7 +172,6 @@ short ExTransaction::getCurrentXnId(Int64 * tcbref, Int64 *transId, return retcode; } -// LCOV_EXCL_START : code not used #pragma nowarn(262) // warning elimination short ExTransaction::getCurrentTxHandle(short * txHandle) { @@ -185,7 +184,6 @@ short ExTransaction::getCurrentTxHandle(short * txHandle) return retcode; } #pragma warn(262) // warning elimination -// LCOV_EXCL_STOP #pragma nowarn(262) // warning elimination @@ -202,7 +200,7 @@ short ExTransaction::waitForRollbackCompletion(Int64 transid) if (transid) rc = STATUSTRANSACTION(&status, transid); // using param transid else - rc = STATUSTRANSACTION(&status); // LCOV_EXCL_LINE using current transid + rc = STATUSTRANSACTION(&status); if ((rc == 0) && (status != 5)) { @@ -219,7 +217,7 @@ short ExTransaction::waitForRollbackCompletion(Int64 transid) if (transid) rc = STATUSTRANSACTION(&status, transid); // using param transid. else - rc = STATUSTRANSACTION(&status); // LCOV_EXCL_LINE using current transid + rc = STATUSTRANSACTION(&status); if (! ((rc == 0) && (status != 5))) done = TRUE; @@ -243,7 +241,7 @@ short ExTransaction::waitForCommitCompletion(Int64 transid) if (transid) rc = STATUSTRANSACTION(&status, transid); // using param transid else - rc = STATUSTRANSACTION(&status); // LCOV_EXCL_LINE using current transid + rc = STATUSTRANSACTION(&status); // using current transid if ((rc == 0) && (status != 3)) { // check for return status in a loop until the transaction @@ -257,7 +255,7 @@ short ExTransaction::waitForCommitCompletion(Int64 transid) if (transid) rc = STATUSTRANSACTION(&status, transid); // using param transid. else - rc = STATUSTRANSACTION(&status); // LCOV_EXCL_LINE using current transid + rc = STATUSTRANSACTION(&status); // using current transid if (! ((rc == 0) && (status != 3))) done = TRUE; } @@ -971,7 +969,6 @@ short ExTransaction::setProcessTransToContextTrans // data integrity problems would be a likely result of any // failure. //////////////////////////////////////////////////////////// -// LCOV_EXCL_START : code not used short ExTransaction::resetProcessTrans (TmfPhandle_Struct * oldProcessTxHandle) { @@ -979,7 +976,6 @@ short ExTransaction::resetProcessTrans return retcode; } -// LCOV_EXCL_STOP void ExTransaction::setTransId(Int64 transid) { @@ -1147,7 +1143,6 @@ short ExTransTcb::work() CliGlobals *cliGlobals = stmtGlob->castToExMasterStmtGlobals()->getCliGlobals(); - // LCOV_EXCL_START code used only in Nonstop // if inside of a UDR, let a SET XN stmt get through if it // was compiled with setAllowedInXn option. This is allowed // for jdbc/odbc/sqlj sql statements. @@ -1175,7 +1170,6 @@ short ExTransTcb::work() qparent_.up->insert(); } - // LCOV_EXCL_STOP else{ short rc; @@ -1293,7 +1287,6 @@ short ExTransTcb::work() } break; - // LCOV_EXCL_START : code not used case ROLLBACK_: { if (ta->userEndedExeXn()) { ta->cleanupTransaction(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_transaction.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_transaction.h b/core/sql/executor/ex_transaction.h index 8c5ed61..cadf57b 100644 --- a/core/sql/executor/ex_transaction.h +++ b/core/sql/executor/ex_transaction.h @@ -403,11 +403,11 @@ public: ex_queue_pair getParentQueue() const{return qparent_;}; inline Int32 orderedQueueProtocol() const{return ((const ExTransTdb &)tdb).orderedQueueProtocol();} - void freeResources(){}; // LCOV_EXCL_LINE Code not used + void freeResources(){}; Int32 numChildren() const { return 0; } - const ex_tcb* getChild(Int32 /*pos*/) const { return 0; } // LCOV_EXCL_LINE Code not used + const ex_tcb* getChild(Int32 /*pos*/) const { return 0; } private: ex_queue_pair qparent_; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_tuple.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_tuple.cpp b/core/sql/executor/ex_tuple.cpp index 3f8b9b2..a8a2e16 100644 --- a/core/sql/executor/ex_tuple.cpp +++ b/core/sql/executor/ex_tuple.cpp @@ -65,7 +65,6 @@ ex_tcb * ExTupleLeafTdb::build(ex_globals * glob) return tcb; } -// LCOV_EXCL_START /////////////////////////////////////// // class ExTupleNonLeafTdb /////////////////////////////////////// @@ -81,7 +80,6 @@ ex_tcb * ExTupleNonLeafTdb::build(ex_globals * glob) return tcb; } -// LCOV_EXCL_STOP ////////////////////////////////////////// // class ExTupleTcb @@ -131,14 +129,12 @@ ExTupleTcb::~ExTupleTcb() freeResources(); } -// LCOV_EXCL_START short ExTupleTcb::work() { // should not reach here ex_assert(0, "ExTupleTcb::work() must be redefined"); return WORK_OK; } -// LCOV_EXCL_STOP void ExTupleTcb::freeResources() { @@ -353,7 +349,6 @@ ExWorkProcRetcode ExTupleLeafTcb::work() #pragma warn(203) // warning elimination } -// LCOV_EXCL_START /////////////////////////////////////////////// // class ExTupleNonLeafTcb /////////////////////////////////////////////// @@ -645,7 +640,6 @@ ExWorkProcRetcode ExTupleNonLeafTcb::work() return WORK_OK; #pragma warn(203) // warning elimination } -// LCOV_EXCL_STOP ///////////////////////////////////////////// // class ExTuplePrivateState http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_tuple.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_tuple.h b/core/sql/executor/ex_tuple.h index 3a64db6..c06de28 100644 --- a/core/sql/executor/ex_tuple.h +++ b/core/sql/executor/ex_tuple.h @@ -104,7 +104,6 @@ private: // --------------------------------------------------------------------- }; -// LCOV_EXCL_START // ----------------------------------------------------------------------- // ExTupleNonLeafTdb // ----------------------------------------------------------------------- @@ -155,10 +154,6 @@ private: // the classes to the comexe project. // --------------------------------------------------------------------- }; - // LCOV_EXCL_STOP - - - //////////////////////////////////////// // class ExTupleTcb @@ -203,7 +198,7 @@ public: }; virtual Int32 numChildren() const { return 0;}; - virtual const ex_tcb* getChild(Int32 pos) const { return NULL;}; //LCOV_EXCL_LINE + virtual const ex_tcb* getChild(Int32 pos) const { return NULL;}; protected: ex_queue_pair qparent; @@ -235,7 +230,6 @@ public: -// LCOV_EXCL_START //////////////////////////////////////////////// // class ExTupleNonLeafTcb //////////////////////////////////////////////// @@ -264,8 +258,6 @@ private: queue_index nextToSendDown_; // next down queue index to send to server }; -// LCOV_EXCL_STOP - class ExTuplePrivateState : public ex_tcb_private_state { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/ex_tuple_flow.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_tuple_flow.cpp b/core/sql/executor/ex_tuple_flow.cpp index a568a5c..53013d5 100644 --- a/core/sql/executor/ex_tuple_flow.cpp +++ b/core/sql/executor/ex_tuple_flow.cpp @@ -83,7 +83,6 @@ ExTupleFlowTcb::ExTupleFlowTcb(const ExTupleFlowTdb & tuple_flow_tdb, { CollHeap * space = glob->getSpace(); - // LCOV_EXCL_START // Allocate the buffer pool, if tgtExpr_ is present if (tuple_flow_tdb.tgtExpr_) #pragma nowarn(1506) // warning elimination @@ -91,7 +90,6 @@ ExTupleFlowTcb::ExTupleFlowTcb(const ExTupleFlowTdb & tuple_flow_tdb, tuple_flow_tdb.bufferSize_, glob->getSpace()); #pragma warn(1506) // warning elimination - // LCOV_EXCL_STOP tcbSrc_ = &src_tcb; tcbTgt_ = &tgt_tcb; @@ -124,12 +122,10 @@ ExTupleFlowTcb::ExTupleFlowTcb(const ExTupleFlowTdb & tuple_flow_tdb, to_parent_cri, space); - // LCOV_EXCL_START // fixup expressions if (tflowTdb().tgtExpr_) (void) tflowTdb().tgtExpr_->fixup(0, getExpressionMode(), this, glob->getSpace(), glob->getDefaultHeap(), FALSE, glob); - // LCOV_EXCL_STOP } @@ -256,7 +252,6 @@ short ExTupleFlowTcb::work() { // move this source row to target. - // LCOV_EXCL_START // BEGIN: - Read note at beginning of work(). // if (tcbSrc_->getNodeType() == ComTdb::ex_PACKROWS) @@ -270,7 +265,6 @@ short ExTupleFlowTcb::work() } // // END:- Read note at beginning of work(). - // LCOV_EXCL_STOP pstate.srcRequestCount_++; tgt_entry->downState.request = @@ -313,7 +307,6 @@ short ExTupleFlowTcb::work() pstate.tgtRequests_++; } - // LCOV_EXCL_START if ((pstate.tgtRowsSent_ == FALSE) && (src_entry->getDiagsArea())) { @@ -327,16 +320,13 @@ short ExTupleFlowTcb::work() qParent_.up->getTailEntry(); up_entry->setDiagsArea(src_entry->getDiagsArea()); } - // LCOV_EXCL_STOP qSrc_.up->removeHead(); pstate.srcEOD_ = TRUE; - // LCOV_EXCL_START if (tflowTdb().sendEODtoTgt()) pstate.step_ = MOVE_EOD_TO_TGT_; - // LCOV_EXCL_STOP } break; @@ -409,7 +399,7 @@ short ExTupleFlowTcb::work() default: { - ex_assert(0, "ExTupleFlowTcb::work() Error returned from src"); // LCOV_EXCL_LINE + ex_assert(0, "ExTupleFlowTcb::work() Error returned from src"); } break; } // switch @@ -443,10 +433,8 @@ short ExTupleFlowTcb::work() pstate.tgtRequests_++; - // LCOV_EXCL_START if (tflowTdb().sendEODtoTgt()) pstate.srcEOD_ = TRUE; - // LCOV_EXCL_STOP else pstate.srcEOD_ = FALSE; @@ -578,7 +566,7 @@ short ExTupleFlowTcb::work() default: { - ex_assert(0, "ExTupleFlowTcb::work() Error returned from tgt"); // LCOV_EXCL_LINE + ex_assert(0, "ExTupleFlowTcb::work() Error returned from tgt"); } break; @@ -667,7 +655,7 @@ short ExTupleFlowTcb::work() default: { - ex_assert(0, "ExTupleFlowTcb::work() Error returned from src"); // LCOV_EXCL_LINE + ex_assert(0, "ExTupleFlowTcb::work() Error returned from src"); } break; } @@ -695,7 +683,7 @@ short ExTupleFlowTcb::work() default: { - ex_assert(0, "ExTupleFlowTcb::work() Error returned from tgt"); // LCOV_EXCL_LINE + ex_assert(0, "ExTupleFlowTcb::work() Error returned from tgt"); } break; } @@ -767,7 +755,6 @@ short ExTupleFlowTcb::work() pentry->upState.parentIndex = pentry_down->downState.parentIndex; pentry->upState.setMatchNo(pstate.matchCount_); - // LCOV_EXCL_START // BEGIN: Read note at beginning of work(). // if(pstate.noOfUnPackedRows_ != 0) @@ -783,7 +770,6 @@ short ExTupleFlowTcb::work() } // // END: - Read note at beginning of work(). - // LCOV_EXCL_STOP // if stats are to be collected, collect them. if (getStatsEntry()) http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/key_range.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/key_range.h b/core/sql/executor/key_range.h index e493d58..29da34d 100644 --- a/core/sql/executor/key_range.h +++ b/core/sql/executor/key_range.h @@ -106,7 +106,7 @@ public: virtual void release(); // release - virtual void display() const {}; // LCOV_EXCL_LINE + virtual void display() const {}; // key range iterator methods virtual ExeErrorCode initNextKeyRange(sql_buffer_pool *pool, @@ -123,12 +123,10 @@ public: // on the next method, we pass in NULL if a probe resulted in no // data; we pass in the encoded key value if data was obtained -// LCOV_EXCL_START virtual void reportProbeResult(char *) { ex_assert(0,"reportProbeResult() was called when it shouldn't have been"); }; -// LCOV_EXCL_STOP // when getNextKeyRange() returns FETCH_RANGE or PROBE_RANGE, the // caller should call the next four methods to get its hands on the http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/executor/timeout_data.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/timeout_data.h b/core/sql/executor/timeout_data.h index 82afc6b..8eefea7 100644 --- a/core/sql/executor/timeout_data.h +++ b/core/sql/executor/timeout_data.h @@ -157,7 +157,7 @@ public: TimeoutData(CollHeap *heap, ULng32 estimatedMaxEntries = 16); // ctor - ~TimeoutData() {} ; // do nothing dtor // LCOV_EXCL_LINE + ~TimeoutData() {} ; // do nothing dtor // for lock timeout void setAllLockTimeout( Lng32 lockTimeoutValue ); @@ -171,7 +171,7 @@ public: void setStreamTimeout( Lng32 streamTimeoutValue ); void resetStreamTimeout(); NABoolean isStreamTimeoutSet() { return streamTimeoutSet_;} ; - Lng32 getStreamTimeout() { return streamTimeoutValue_;} ; // LCOV_EXCL_LINE + Lng32 getStreamTimeout() { return streamTimeoutValue_;} ; // copy relevant data from this TimeoutData object into another object, // The "anotherTD" may need to be allocated (if there's relevant data) @@ -192,7 +192,7 @@ public: void unpackObj(IpcConstMessageBufferPtr &buffer); #if _DEBUG // for debugging only - ULng32 entries() { return timeoutsHT_.entries() ; } ; // LCOV_EXCL_LINE + ULng32 entries() { return timeoutsHT_.entries() ; } ; #endif private: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/ExpLOBprocess.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpLOBprocess.cpp b/core/sql/exp/ExpLOBprocess.cpp index af4569b..9177902 100644 --- a/core/sql/exp/ExpLOBprocess.cpp +++ b/core/sql/exp/ExpLOBprocess.cpp @@ -209,12 +209,10 @@ ExLobGlobals *lobGlobals = NULL; //***************************************************************************** //***************************************************************************** -// LCOV_EXCL_START static void sigterm_handler(Lng32 signo) { printf("sigterm received\n"); } -// LCOV_EXCL_STOP void LOB_process_stop(short flag) { @@ -553,10 +551,8 @@ Lng32 main(Lng32 argc, char *argv[]) // Register sigterm_handler as our signal handler for SIGTERM. if (signal(SIGTERM, sigterm_handler) == SIG_ERR) { - // LCOV_EXCL_START cout << "*** Cannot handle SIGTERM ***" << endl; exit(1); - // LCOV_EXCL_STOP } retval = pthread_mutex_init(&cnfg_mutex, NULL); @@ -565,7 +561,7 @@ Lng32 main(Lng32 argc, char *argv[]) // seaquest related stuff retval = msg_init_attach(&argc, &argv, true, (char *)""); if (retval) - printf("msg_init_attach returned: %d\n", retval); // LCOV_EXCL_LINE + printf("msg_init_attach returned: %d\n", retval); // sq_fs_dllmain(); msg_mon_process_startup(true); msg_mon_enable_mon_messages(1); @@ -573,10 +569,8 @@ Lng32 main(Lng32 argc, char *argv[]) retval = atexit((void(*)(void))msg_mon_process_shutdown); if (retval != 0) { - // LCOV_EXCL_START cout << "*** atexit failed with error " << retval << " ***" << endl; exit(1); - // LCOV_EXCL_STOP } // setup log4cxx QRLogger::initLog4cxx(QRLogger::QRL_LOB); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/ExpPCode.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpPCode.cpp b/core/sql/exp/ExpPCode.cpp index f3f2096..540136f 100644 --- a/core/sql/exp/ExpPCode.cpp +++ b/core/sql/exp/ExpPCode.cpp @@ -1293,7 +1293,6 @@ Int32 PCode::isInstructionRangeType( PCIT::Instruction instruction) }; } -// LCOV_EXCL_START Int32 PCode::profileInit() { if(profileCounts_) delete [] profileCounts_; if(profileTimes_) delete [] profileTimes_; @@ -1307,12 +1306,10 @@ Int32 PCode::profileInit() { return 0; } -// LCOV_EXCL_STOP Int32 PCode::profilePrint() { PCIListIter iter(pciList_); if(!profileCounts_) return 0; - // LCOV_EXCL_START Int32 pciNum = 0; for(PCI *pci = iter.first(); pci; pci = iter.next()) { if(pci->getOperation() == PCIT::Op_PROFILE) { @@ -1321,10 +1318,8 @@ Int32 PCode::profilePrint() { } pciNum++; } - // LCOV_EXCL_STOP return 0; } -// LCOV_EXCL_START //buffer should be 32 bytes void PCIT::operandString(Int32 operand, char* buffer) { // str_sprintf(buffer, "%8.8X", operand); @@ -1557,7 +1552,6 @@ void PCode::dumpContents(PCodeBinary* pCode, char* buf, Int32 bufLen) { buf[len+1] = 0; } -// LCOV_EXCL_STOP PCodeBinary * PCode::generateCodeSegment(Int32 length, Int32 *atpCode, Int32 *atpIndexCode, @@ -1788,7 +1782,6 @@ const char *PCIT::operationString(PCIT::Operation op) { case PCIT::Op_LD_ATP: return("LD_ATP"); case PCIT::Op_LD_UNALIGNED_ATP: return("LD_UNALIGNED_ATP"); case PCIT::Op_MV_ATP_N: return("MV_N");*/ - // LCOV_EXCL_START case PCIT::Op_OPDATA: return("OPDATA"); case PCIT::Op_MOVE: return("MOVE"); @@ -1816,7 +1809,6 @@ const char *PCIT::operationString(PCIT::Operation op) { case PCIT::Op_AND: return("AND"); case PCIT::Op_OR: return("OR"); - // LCOV_EXCL_STOP case PCIT::Op_SUM: return("SUM"); case PCIT::Op_MINMAX: return("MINMAX"); case PCIT::Op_ADD: return("ADD"); @@ -1834,7 +1826,6 @@ const char *PCIT::operationString(PCIT::Operation op) { case PCIT::Op_DECODE: return("DECODE"); case PCIT::Op_GENFUNC: return("GENFUNC"); - // LCOV_EXCL_START case PCIT::Op_HASH: return("HASH"); case PCIT::Op_FILL_MEM_BYTES: return("FILL_MEM_BYTES"); case PCIT::Op_RETURN: return("RETURN"); @@ -1843,10 +1834,8 @@ const char *PCIT::operationString(PCIT::Operation op) { case PCIT::Op_BRANCH_AND: return("BRANCH_AND"); case PCIT::Op_BRANCH_OR: return("BRANCH_OR"); case PCIT::Op_TARGET: return("TARGET"); - // LCOV_EXCL_STOP case PCIT::Op_RANGE_LOW: return("RANGE_LOW"); case PCIT::Op_RANGE_HIGH: return("RANGE_HIGH"); - // LCOV_EXCL_START case PCIT::Op_REPLACE_NULL: return("REPLACE_NULL"); case PCIT::Op_CLAUSE: return("CLAUSE"); @@ -1868,7 +1857,6 @@ const char *PCIT::operationString(PCIT::Operation op) { case PCIT::Op_CONV_VC_PTR: return("CONV_VC_PTR"); case PCIT::Op_END: return("END"); - // LCOV_EXCL_STOP default: return("UNKNOWN OPERATION"); } } @@ -1896,7 +1884,6 @@ const char *PCIT::addressingModeString(PCIT::AddressingMode am) { case PCIT::IBIN8U: return("IBIN8U"); case PCIT::IBIN16U: return("IBIN16U"); case PCIT::IBIN64S: return("IBIN64S"); - // LCOV_EXCL_START case PCIT::IBIN32S: return("IBIN32S"); case PCIT::IATTR4: return("IATTR4"); case PCIT::IATTR3: return("IATTR3"); @@ -1904,14 +1891,11 @@ const char *PCIT::addressingModeString(PCIT::AddressingMode am) { case PCIT::MATTR3: return("MATTR3"); case PCIT::MATTR4: return("MATTR4"); - // LCOV_EXCL_STOP case PCIT::MATTR5: return("MATTR5"); - // LCOV_EXCL_START case PCIT::MATTR6: return("MATTR6"); case PCIT::MUNI: return("MUNI"); case PCIT::MUNIV: return("MUNIV"); - // LCOV_EXCL_STOP case PCIT::IPTR: return("IPTR"); @@ -2651,7 +2635,6 @@ PCIID PCode::nullBranchHelper(AttributesPtr *attrs, // else { - // LCOV_EXCL_START if( attrA->isSQLMXAlignedFormat() || attrB->isSQLMXAlignedFormat() ) { AML aml(PCIT::MPTR32,PCIT::MPTR32,PCIT::IPTR,PCIT::IPTR); @@ -2672,7 +2655,6 @@ PCIID PCode::nullBranchHelper(AttributesPtr *attrs, attrB->getAtp(), attrB->getAtpIndex(), attrB->getNullIndOffset()); PCI pci(PCIT::Op_NULL_VIOLATION, aml, ol); - // LCOV_EXCL_STOP code.append(pci); } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/ExpPCodeOptimizations.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpPCodeOptimizations.cpp b/core/sql/exp/ExpPCodeOptimizations.cpp index fff0647..326c614 100644 --- a/core/sql/exp/ExpPCodeOptimizations.cpp +++ b/core/sql/exp/ExpPCodeOptimizations.cpp @@ -9734,7 +9734,6 @@ OptPCodeCache::logPCCEvent( Int32 eventType } #endif // OPT_PCC_DEBUG==1 -// LCOV_EXCL_START // // printPCodeExprCacheStats() -- intended to be called by gdb to give the // developer a formatted view of the cache's statistics. @@ -9748,4 +9747,3 @@ OptPCodeCache::printPCodeExprCacheStats() printf("MaxOptPCodeSize = %d, MaxHitsForAnyOneEntry = %ld, MaxHitsForAnyDeletedEntry = %ld\n", maxOptPCodeSize_ , maxHits_ , maxHitsDel_ ); } -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/ExpSequenceFunction.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpSequenceFunction.cpp b/core/sql/exp/ExpSequenceFunction.cpp index 8c94be0..b64e323 100644 --- a/core/sql/exp/ExpSequenceFunction.cpp +++ b/core/sql/exp/ExpSequenceFunction.cpp @@ -101,19 +101,13 @@ ex_expr::exp_return_type ExpSequenceFunction::pCodeGenerate(Space *space, UInt32 return ex_clause::pCodeGenerate(space, f); if(getNumOperands() != 2 && getNumOperands() != 3) - // LCOV_EXCL_START return ex_clause::pCodeGenerate(space, f); - // LCOV_EXCL_STOP if(!nullRowIsZero()) - // LCOV_EXCL_START return ex_clause::pCodeGenerate(space, f); - // LCOV_EXCL_STOP if(!isLeading() || (winSize() != 0)) - // LCOV_EXCL_START return ex_clause::pCodeGenerate(space, f); - // LCOV_EXCL_STOP AttributesPtr *attrs = getOperand(); Lng32 fsDataType = attrs[1]->getDatatype(); @@ -127,9 +121,7 @@ ex_expr::exp_return_type ExpSequenceFunction::pCodeGenerate(Space *space, UInt32 length = attrs[2]->getLength(); if(fsDataType != REC_BIN32_SIGNED || length != 4) - // LCOV_EXCL_START return ex_clause::pCodeGenerate(space, f); - // LCOV_EXCL_STOP } // If we get to this point, we have decided to generate PCode for this @@ -223,9 +215,7 @@ ex_expr::exp_return_type ExpSequenceFunction::eval(char *op_data[], Int32 index; if(getNumOperands() >= 3) { if(attrs[2]->getNullFlag() && !op_data[-2 * MAX_OPERANDS + 2]) - // LCOV_EXCL_START index = -1; - // LCOV_EXCL_STOP else index = *((Int32 *)op_data[2]); } @@ -246,10 +236,8 @@ ex_expr::exp_return_type ExpSequenceFunction::eval(char *op_data[], if(rc == -1) { - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_HISTORY_BUFFER_TOO_SMALL); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } if(row) { @@ -298,21 +286,17 @@ ex_expr::exp_return_type ExpSequenceFunction::eval(char *op_data[], case REC_BIN16_UNSIGNED: case REC_BIN16_SIGNED: { - // LCOV_EXCL_START // hiding code from code coverag tool-- short value = 0; str_cpy_all(dstData, (char *) &value, sizeof(value)); break; - // LCOV_EXCL_STOP } case REC_BIN32_SIGNED: case REC_BIN32_UNSIGNED: { - // LCOV_EXCL_START Lng32 value = 0; str_cpy_all(dstData, (char *) &value, sizeof(value)); break; - // LCOV_EXCL_STOP } case REC_BIN64_SIGNED: { @@ -322,11 +306,9 @@ ex_expr::exp_return_type ExpSequenceFunction::eval(char *op_data[], } case REC_IEEE_FLOAT32: { - // LCOV_EXCL_START float value = 0; str_cpy_all(dstData, (char *) &value, sizeof(value)); break; - // LCOV_EXCL_STOP } case REC_IEEE_FLOAT64: { @@ -349,9 +331,7 @@ ex_expr::exp_return_type ExpSequenceFunction::eval(char *op_data[], getOperand(1)->getScale(), NULL, 0, heap, diagsArea, CONV_UNKNOWN) != ex_expr::EXPR_OK) { - // LCOV_EXCL_START return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } break; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/ExpSqlTupp.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpSqlTupp.cpp b/core/sql/exp/ExpSqlTupp.cpp index 26d8db0..831b3ce 100644 --- a/core/sql/exp/ExpSqlTupp.cpp +++ b/core/sql/exp/ExpSqlTupp.cpp @@ -63,7 +63,6 @@ tupp::~tupp() // destructor // release the pointer before deallocating the space for it release(); } -// LCOV_EXCL_START Long tupp::pack(void * space) { if (tuppDescPointer) @@ -82,7 +81,6 @@ Lng32 tupp::unpack(Lng32 base) return 0; } -// LCOV_EXCL_STOP tupp_descriptor::tupp_descriptor() { init(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_aggregate.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_aggregate.cpp b/core/sql/exp/exp_aggregate.cpp index ab06402..60e5ea4 100644 --- a/core/sql/exp/exp_aggregate.cpp +++ b/core/sql/exp/exp_aggregate.cpp @@ -133,7 +133,6 @@ ex_expr::exp_return_type ex_aggregate_clause::init() { return ex_expr::EXPR_OK; } -// LCOV_EXCL_START ex_expr::exp_return_type ex_aggregate_clause::eval(char * /*op_data*/[], CollHeap *heap, ComDiagsArea** diagsArea) @@ -141,7 +140,6 @@ ex_expr::exp_return_type ex_aggregate_clause::eval(char * /*op_data*/[], ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP ///////////////////////////////////////////////// // class ex_aggr_one_row_clause ///////////////////////////////////////////////// @@ -199,7 +197,6 @@ ex_expr::exp_return_type ex_aggr_any_true_max_clause::eval(char *op_data[], case -1: // operand is NULL { // remember that a null was seen. - // LCOV_EXCL_START nullSeen_ = 1; // Genesis 10-040203-2921 @@ -225,7 +222,6 @@ ex_expr::exp_return_type ex_aggr_any_true_max_clause::eval(char *op_data[], { ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); retcode = ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } break; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_arith.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_arith.cpp b/core/sql/exp/exp_arith.cpp index c5d5ce5..b229d09 100644 --- a/core/sql/exp/exp_arith.cpp +++ b/core/sql/exp/exp_arith.cpp @@ -393,14 +393,12 @@ short EXP_FIXED_BIGN_OV_DIV(Attributes * op1, if(op1->isSimpleType()) { char * op1_data[2]; - // LCOV_EXCL_START op1_data[0] = op1BNdata; op1_data[1] = op_data[1]; rc = op1BN.castFrom(op1, op1_data, NULL, NULL); if(rc) return -1; div_data[1] = op1BNdata; - // LCOV_EXCL_STOP } else div_data[1] = op_data[1]; @@ -447,7 +445,6 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1, //convert op1 & op2 to bignum if not already bignum if(op1->isSimpleType()) { - // LCOV_EXCL_START char * op1_data[2]; op1_data[0] = op1BNdata; op1_data[1] = op_data[0]; @@ -458,7 +455,6 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1, return -1; } mod_data[1] = op1BNdata; - // LCOV_EXCL_STOP } else mod_data[1] = op_data[0]; @@ -471,10 +467,8 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1, rc = op2BN.castFrom(op2, op2_data, NULL, NULL); if(rc) { - // LCOV_EXCL_START *ov = 1; return -1; - // LCOV_EXCL_STOP } mod_data[2] = op2BNdata; } @@ -498,10 +492,8 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1, rc = modBN.div(&op1BN, &op2BN, temp_data, NULL, NULL); if(rc) { - // LCOV_EXCL_START *ov = 1; return -1; - // LCOV_EXCL_STOP } //calculate (x/y) * y @@ -512,10 +504,8 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1, rc = modBN.mul(&op1BN, &op2BN, temp_data); if(rc) { - // LCOV_EXCL_START *ov = 1; return -1; - // LCOV_EXCL_STOP } //Calculate final result z = x - xByYTimesY @@ -631,7 +621,6 @@ ex_arith_sum_clause::processNulls(char *null_data[], // N y set a to nonnull and zero and call eval to compute A=1+0 // N N do nothing (A=N) // -// LCOV_EXCL_START ex_expr::exp_return_type ex_arith_count_clause::processNulls(char *null_data[], CollHeap *heap, @@ -657,7 +646,6 @@ ex_arith_count_clause::processNulls(char *null_data[], return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], CollHeap *heap, ComDiagsArea** diagsArea) @@ -671,14 +659,12 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], *(short *)op_data[0] = *(short *)op_data[1] + *(short *)op_data[2]; #pragma warn(1506) // warning elimination break; - // LCOV_EXCL_START case ADD_BIN16S_BIN16S_BIN32S: *(Lng32 *)op_data[0] = *(short *)op_data[1] + *(short *)op_data[2]; break; case ADD_BIN16S_BIN32S_BIN32S: *(Lng32 *)op_data[0] = *(short *)op_data[1] + *(Lng32 *)op_data[2]; break; - // LCOV_EXCL_STOP case ADD_BIN32S_BIN16S_BIN32S: *(Lng32 *)op_data[0] = *(Lng32 *)op_data[1] + *(short *)op_data[2]; break; @@ -686,10 +672,8 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], *(Lng32 *)op_data[0] = *(Lng32 *)op_data[1] + *(Lng32 *)op_data[2]; break; case ADD_BIN32S_BIN64S_BIN64S: - // LCOV_EXCL_START *(Int64 *)op_data[0] = *(Int64 *)op_data[2] + *(Lng32 *)op_data[1]; break; - // LCOV_EXCL_STOP case ADD_BIN64S_BIN32S_BIN64S: *(Int64 *)op_data[0] = *(Int64 *)op_data[1] + *(Lng32 *)op_data[2]; break; @@ -702,10 +686,8 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], &ov); if (ov) { - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } @@ -720,10 +702,8 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], *(ULng32 *)op_data[0] = *(unsigned short *)op_data[1] + *(unsigned short *)op_data[2]; break; case ADD_BIN16U_BIN32U_BIN32U: - // LCOV_EXCL_START *(ULng32 *)op_data[0] = *(unsigned short *)op_data[1] + *(ULng32 *)op_data[2]; break; - // LCOV_EXCL_STOP case ADD_BIN32U_BIN16U_BIN32U: *(ULng32 *)op_data[0] = *(ULng32 *)op_data[1] + *(unsigned short *)op_data[2]; break; @@ -734,13 +714,11 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], *(Int64 *)op_data[0] = *(Int64 *)op_data[2] + *(unsigned short *)op_data[1]; break; case ADD_BIN64S_BPINTU_BIN64S: - // LCOV_EXCL_START *(Int64 *)op_data[0] = *(Int64 *)op_data[1] + *(unsigned short *)op_data[2]; break; case ADD_BIN32U_BIN64S_BIN64S: *(Int64 *)op_data[0] = *(Int64 *)op_data[2] + *(ULng32 *)op_data[1]; break; - // LCOV_EXCL_STOP case ADD_BIN64S_BIN32U_BIN64S: *(Int64 *)op_data[0] = *(Int64 *)op_data[1] + *(ULng32 *)op_data[2]; break; @@ -792,7 +770,6 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], /* SUB operation */ case SUB_BIN16S_BIN16S_BIN16S: #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START *(short *)op_data[0] = *(short *)op_data[1] - *(short *)op_data[2]; #pragma warn(1506) // warning elimination break; @@ -808,7 +785,6 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], case SUB_BIN32S_BIN32S_BIN32S: *(Lng32 *)op_data[0] = *(Lng32 *)op_data[1] - *(Lng32 *)op_data[2]; break; - // LCOV_EXCL_STOP case SUB_BIN64S_BIN64S_BIN64S: { short ov; @@ -817,10 +793,8 @@ ex_expr::exp_return_type ex_arith_clause::eval(char *op_data[], &ov); if (ov) { - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } //*(Int64 *)op_data[0] = *(Int64 *)op_data[1] - *(Int64 *)op_data[2];
