Repository: incubator-trafodion Updated Branches: refs/heads/master 4e316c05d -> 0ff0d92a1
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_la.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_la.cpp b/core/sql/ustat/hs_la.cpp index c5fceac..3e1b2d8 100644 --- a/core/sql/ustat/hs_la.cpp +++ b/core/sql/ustat/hs_la.cpp @@ -519,7 +519,6 @@ Int64 HSSqTableDef::getRowCount(NABoolean &isEstimate, return 1000000; } -// LCOV_EXCL_START :nt /***************************************************************************/ /* METHOD: getRowCountUsingSelect() */ /* PURPOSE: Get row count of a table using 'select count(*)'. */ @@ -545,7 +544,6 @@ Int64 HSTableDef::getRowCountUsingSelect() return rows; } -// LCOV_EXCL_STOP //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // 10-060424-6040 @@ -560,7 +558,6 @@ NABoolean HSSqTableDef::publicSchemaExists() { return FALSE; } -// LCOV_EXCL_STOP // Check to see if a system defined SYSKEY exists and set hasSyskey_ flag. Lng32 HSSqTableDef::setHasSyskeyFlag() @@ -591,7 +588,7 @@ Lng32 HSSqTableDef::setHasSyskeyFlag() query = "SELECT SYSKEY, * FROM "; if(objActualFormat_ == SQLMP) - query += getTableName(tableName_->data(), nameSpace_); // LCOV_EXCL_LINE :nsk + query += getTableName(tableName_->data(), nameSpace_); else query += getTableName(ansiName_->data(), nameSpace_); @@ -742,22 +739,18 @@ NAString HSSqTableDef::getNodeName() const NAString HSTableDef::getObjectFullName() const { - // LCOV_EXCL_START :nsk if(objActualFormat_ == SQLMP) return tableName_->data(); else - // LCOV_EXCL_STOP return ansiName_->data(); } -// LCOV_EXCL_START :nsk NAString HSSqTableDef::getCatalogLoc(formatType format) const { NAString catalogName; return catalogName; } -// LCOV_EXCL_STOP NAString HSTableDef::getPrimaryLoc(formatType format) const @@ -772,7 +765,6 @@ NAString HSTableDef::getPrimaryLoc(formatType format) const } else { - // LCOV_EXCL_START :nsk if (objActualFormat_ == SQLMP) { loc.append(catalog_->data()); @@ -780,7 +772,6 @@ NAString HSTableDef::getPrimaryLoc(formatType format) const loc.append(ToAnsiIdentifier(schema_->data())); } else - // LCOV_EXCL_STOP { loc.append(ToAnsiIdentifier(catalog_->data())); loc.append("."); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_log.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_log.cpp b/core/sql/ustat/hs_log.cpp index f7584d0..988b7c2 100644 --- a/core/sql/ustat/hs_log.cpp +++ b/core/sql/ustat/hs_log.cpp @@ -124,7 +124,6 @@ void HSFuncMergeDiags( Lng32 sqlcode // If an internal error was triggered by some other error, add a parameter // that specifies that error number. The format of the message is such that // it will read correctly with or without this parameter. - // LCOV_EXCL_START :rfi if (sqlcode == -UERR_INTERNAL_ERROR) { if (sqlcode2 < 0) @@ -136,7 +135,6 @@ void HSFuncMergeDiags( Lng32 sqlcode else diagsArea << DgString2(""); } - // LCOV_EXCL_STOP if (fsError) diagsArea << DgInt0(fsError); @@ -573,7 +571,7 @@ void HSLogMan::LogTimeDiff(const char *text, NABoolean reset) timeval curTime; if (gettimeofday(&curTime, 0) != 0) - Log("ERROR: gettimeofday failed.\n"); // LCOV_EXCL_LINE :rfi + Log("ERROR: gettimeofday failed.\n"); else // calcualte time difference only when this is not a reset and prevtime has been set if (!reset && (prevTime_.tv_sec != 0 || prevTime_.tv_usec != 0)) http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_parser.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_parser.cpp b/core/sql/ustat/hs_parser.cpp index bbfe978..c01a6d9 100644 --- a/core/sql/ustat/hs_parser.cpp +++ b/core/sql/ustat/hs_parser.cpp @@ -374,13 +374,11 @@ Lng32 AddTableName( const hs_table_type type LM->Log(LM->msg); } HSGlobalsClass::schemaVersion = getTableSchemaVersion(hs_globals->user_table->data()); - // LCOV_EXCL_START :rfi if (HSGlobalsClass::schemaVersion == COM_VERS_UNKNOWN) { HSFuncMergeDiags(-UERR_INTERNAL_ERROR, "GET_SCHEMA_VERSION"); return -1; } - // LCOV_EXCL_STOP if (HSGlobalsClass::schemaVersion >= COM_VERS_2300) @@ -416,7 +414,6 @@ Lng32 AddTableName( const hs_table_type type } else { - // LCOV_EXCL_START :nsk *hs_globals->hstogram_table = hs_globals->objDef->getCatalogLoc(HSTableDef::EXTERNAL_FORMAT); hs_globals->hstogram_table->append(".HISTOGRM"); @@ -426,7 +423,6 @@ Lng32 AddTableName( const hs_table_type type // RESET CQDS: HSFuncExecQuery("CONTROL QUERY DEFAULT POS RESET"); HSFuncExecQuery("CONTROL QUERY DEFAULT POS_NUM_OF_PARTNS RESET"); - // LCOV_EXCL_STOP } return 0; @@ -1034,21 +1030,17 @@ Lng32 AddEveryColumn(const char *startColumn, const char *endColumn) else { start = hs_globals->objDef->getColNum(startColumn); - // LCOV_EXCL_START :rfi if (start < 0) { retcode = -1; HSHandleError(retcode); } - // LCOV_EXCL_STOP upto = hs_globals->objDef->getColNum(endColumn); - // LCOV_EXCL_START :rfi if (upto < 0) { retcode = -1; HSHandleError(retcode); } - // LCOV_EXCL_STOP if (start > upto) { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_read.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_read.cpp b/core/sql/ustat/hs_read.cpp index f8f9114..638c80a 100644 --- a/core/sql/ustat/hs_read.cpp +++ b/core/sql/ustat/hs_read.cpp @@ -222,7 +222,7 @@ Lng32 HSStatsTimeCursor::open(NABoolean updateReadTime) stmt = "CURSOR102_MX_2300"; } else - stmt = "CURSOR102_MX"; // LCOV_EXCL_LINE :cnu + stmt = "CURSOR102_MX"; return OpenCursor( stmt, (void *)histogramTableName_, @@ -366,7 +366,7 @@ Lng32 HSStatsTimeCursor::get(Int64 &maxStatTime, const NAColumnArray &colArray, (void *)(&readCount), NULL); else retcode_ = SQL_EXEC_Fetch(desc_, NULL, 2,(void *)(&statTime), NULL, - (void *)(&colNumber), NULL); // LCOV_EXCL_LINE :cnu + (void *)(&colNumber), NULL); if (retcode_ == HS_EOF || retcode_ < 0) break; LM->Log("While Fetching StatsTime: Check for update of READ_TIME/READ_COUNT."); @@ -885,7 +885,6 @@ Lng32 FetchHistograms( const QualifiedName & qualifiedName } else { - // LCOV_EXCL_START :nsk ComMPLoc tempObj (actualQualifiedName.getQualifiedNameAsString().data(), ComMPLoc::FILE); objectName = new(STMTHEAP) ComObjectName(tempObj.getSysDotVol(), @@ -898,7 +897,6 @@ Lng32 FetchHistograms( const QualifiedName & qualifiedName *objectName, GUARDIAN_TABLE, ExtendedQualName::convSpecialTableTypeToAnsiNameSpace(actualType)); - // LCOV_EXCL_STOP } if ((actualType == ExtendedQualName::NORMAL_TABLE || @@ -936,10 +934,8 @@ Lng32 FetchHistograms( const QualifiedName & qualifiedName } else { - // LCOV_EXCL_START :nsk histogramTableName = tabDef->getCatalogLoc(HSTableDef::EXTERNAL_FORMAT) + ".HISTOGRM"; histintsTableName = tabDef->getCatalogLoc(HSTableDef::EXTERNAL_FORMAT) + ".HISTINTS"; - // LCOV_EXCL_STOP } fullQualName = tabDef->getObjectFullName(); @@ -1572,14 +1568,12 @@ Lng32 HSHistogrmCursor::fetch( HSColStats &cs // histograms. So, this code could be removed. // if it is an empty histogram for automation (it has been needed before), // flag it, so it will not be added again - // LCOV_EXCL_START :cnu if ( reason_ == HS_REASON_EMPTY ) { if (colCount_ == 1) // an empty histogram exists for this single column histogram emptyHistogram[tableColNum_] = TRUE; continue; } - // LCOV_EXCL_STOP // update the latest statsTime only when it is not an empty histogram if (statsTime < statsTime_) statsTime = statsTime_; @@ -1707,7 +1701,6 @@ Lng32 HSHistogrmCursor::fetch( HSColStats &cs numHistograms++; } - // LCOV_EXCL_START :rfi catch (CmpInternalException&) { //No need to handle exception because default histograms will be @@ -1724,7 +1717,6 @@ Lng32 HSHistogrmCursor::fetch( HSColStats &cs << DgString2(LM->msg); throw; } - // LCOV_EXCL_STOP } while ((retcode_ = get()) == 0); @@ -1792,7 +1784,6 @@ Lng32 HSHistogrmCursor::get() //(void *)buf3_, NULL, //(void *)buf4_, NULL ); - // LCOV_EXCL_START :cnu else retcode_ = SQL_EXEC_Fetch(desc_, NULL, 9, (void *)&histid_, NULL, @@ -1804,7 +1795,6 @@ Lng32 HSHistogrmCursor::get() (void *)&statsTime_, NULL, (void *)buf1_, NULL, (void *)buf2_, NULL); - // LCOV_EXCL_STOP if (retcode_ < 0) { @@ -1874,11 +1864,11 @@ Lng32 HSHistogrmCursor::open() } else { - if (fileType_ == SQLMP) stmt = "CURSOR101_NOMC_MP"; // LCOV_EXCL_LINE :nsk + if (fileType_ == SQLMP) stmt = "CURSOR101_NOMC_MP"; else if (HSGlobalsClass::schemaVersion >= COM_VERS_2300) stmt = "CURSOR101_NOMC_MX_2300"; - else stmt = "CURSOR101_NOMC_MX"; // LCOV_EXCL_LINE :cnu + else stmt = "CURSOR101_NOMC_MX"; } return OpenCursor( stmt @@ -2126,7 +2116,7 @@ Lng32 HSHistintsCursor::open() NAString stmt; if (fileType_ == SQLMP) - stmt = "CURSOR201_MP"; // LCOV_EXCL_LINE :nsk + stmt = "CURSOR201_MP"; else // histogram versioning if (HSGlobalsClass::schemaVersion >= COM_VERS_2300) @@ -2289,7 +2279,6 @@ Lng32 HSHistintsCursor::get( const ULng32 histid (void *)buf_mfv_, NULL //(void *)buf_v6_, NULL ); - // LCOV_EXCL_START :cnu else retcode_ = SQL_EXEC_Fetch(desc_, NULL, 5, (void *)&histid_, NULL, @@ -2297,7 +2286,6 @@ Lng32 HSHistintsCursor::get( const ULng32 histid (void *)&tempIntRowCount, NULL, (void *)&tempIntUec, NULL, (void *)buf_, NULL); - // LCOV_EXCL_STOP if (retcode_ && retcode_ != HS_EOF) HSLogError(retcode_); if (retcode_) @@ -2399,13 +2387,11 @@ Lng32 OpenCursor( const char *descID param2Addr, NULL); if (retcode) HSFuncMergeDiags(-UERR_INTERNAL_ERROR, "OpenCursor", NULL, TRUE); - // LCOV_EXCL_START :rfi if (retcode < 0 && LM->LogNeeded()) { sprintf(LM->msg, "HSREAD: ***[FAIL=%d]Unable to load module %s", retcode, descID); LM->Log(LM->msg); } - // LCOV_EXCL_STOP return ((retcode < 0) ? -1 : retcode); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_update.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_update.cpp b/core/sql/ustat/hs_update.cpp index bc8492a..b4631ea 100644 --- a/core/sql/ustat/hs_update.cpp +++ b/core/sql/ustat/hs_update.cpp @@ -118,14 +118,12 @@ Lng32 ShowStats(const char* input, char* &outBuf, if (hs_globals_obj.tableFormat == SQLMX) { HSGlobalsClass::schemaVersion = getTableSchemaVersion(*(hs_globals_obj.user_table)); - // LCOV_EXCL_START :rfi if (HSGlobalsClass::schemaVersion == COM_VERS_UNKNOWN) { HSFuncMergeDiags(-UERR_INTERNAL_ERROR, "GET_SCHEMA_VERSION"); retcode = -1; HSExitIfError(retcode); } - // LCOV_EXCL_STOP } if (LM->LogNeeded()) { @@ -332,14 +330,12 @@ Lng32 UpdateStats(char *input, NABoolean requestedByCompiler) /*==============================*/ // Also checked in AddTableName() during parse. Check again, just in case we don't // reach that code. HISTOGRAM corruption can occur if this is not set. - // LCOV_EXCL_START :rfi if (hs_globals_obj.tableFormat == SQLMX && HSGlobalsClass::schemaVersion == COM_VERS_UNKNOWN) { HSFuncMergeDiags(-UERR_INTERNAL_ERROR, "GET_SCHEMA_VERSION"); retcode = -1; HSExitIfError(retcode); } - // LCOV_EXCL_STOP /*==============================*/ /* HANDLE OPTIONS WHICH DO NOT */ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_util.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_util.cpp b/core/sql/ustat/hs_util.cpp index c19a1ac..bc2f0de 100644 --- a/core/sql/ustat/hs_util.cpp +++ b/core/sql/ustat/hs_util.cpp @@ -503,7 +503,6 @@ Lng32 FormatRow(const HSColumnStruct *srcDesc, } // Here begin a number of cases that are only possible with MP datetime types. -// LCOV_EXCL_START :mp case REC_DTCODE_YEAR: { wStr = WIDE_("DATETIME '"); @@ -671,15 +670,12 @@ Lng32 FormatRow(const HSColumnStruct *srcDesc, } break; } -// LCOV_EXCL_STOP - // LCOV_EXCL_START :rfi default: { HS_ASSERT(FALSE); break; } - // LCOV_EXCL_STOP } target = wStr.data(); @@ -774,13 +770,11 @@ Lng32 FormatRow(const HSColumnStruct *srcDesc, na_wsprintf(workBuf, WIDE_("%s SECOND(%d, %d)"), wStr.data(), srcDesc->precision, srcDesc->scale); break; } - // LCOV_EXCL_START :rfi default: { HS_ASSERT(FALSE); break; } - // LCOV_EXCL_STOP } target = workBuf; @@ -865,7 +859,6 @@ NAString getTableName(const NAString name, const ComAnsiNameSpace nameSpace) } -// LCOV_EXCL_START :mp Called only for MP datetime types. static NAWString appendFraction (Lng32 scale) { NAWString wStr; @@ -886,7 +879,6 @@ static NAWString appendFraction (Lng32 scale) return wStr; } -// LCOV_EXCL_STOP // Calculate default sample size for table. Int64 getDefaultSampleSize(Int64 tblRowCount) @@ -960,7 +952,6 @@ Int64 hs_getBaseTime() short baseTsStr[] = {1970, 1, 1, 0, 0, 0, 0, 0}; short error; baseTs = COMPUTETIMESTAMP(baseTsStr, &error); - // LCOV_EXCL_START :rfi if (error) { sprintf(LM->msg, @@ -983,7 +974,6 @@ Int64 hs_getBaseTime() throw CmpInternalException("failure in getEpochTime()", __FILE__, __LINE__); } - // LCOV_EXCL_STOP // baseTs == HS_EPOCH_TIMESTAMP; return baseTs / 1000000; @@ -1016,7 +1006,6 @@ Int64 hs_getEpochTime() short baseTsStr[] = {1970, 1, 1, 0, 0, 0, 0, 0}; short error; baseTs = COMPUTETIMESTAMP(baseTsStr, &error); - // LCOV_EXCL_START :rfi if (error) { sprintf(LM->msg, @@ -1039,7 +1028,6 @@ Int64 hs_getEpochTime() throw CmpInternalException("failure in getEpochTime()", __FILE__, __LINE__); } - // LCOV_EXCL_STOP // baseTs == HS_EPOCH_TIMESTAMP; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/hs_util.h ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_util.h b/core/sql/ustat/hs_util.h index f315a68..ef921de 100644 --- a/core/sql/ustat/hs_util.h +++ b/core/sql/ustat/hs_util.h @@ -134,14 +134,12 @@ inline ULng32 roundup4(ULng32 value) return((value != floor) ? (floor + 4) : value); } -// LCOV_EXCL_START :cnu inline ULng32 roundup8(ULng32 value) { ULng32 floor = value & 0xFFFFFFF8; return((value != floor) ? (floor + 8) : value); } -// LCOV_EXCL_STOP // ----------------------------------------------------------------------- @@ -150,7 +148,6 @@ inline ULng32 roundup8(ULng32 value) // HSPtrObj<T> *t = new HSPtrObj<T>[100]; // delete [] t will delete each individual element which pt_ points to. // ----------------------------------------------------------------------- -// LCOV_EXCL_START :cnu Used only by HSCursor::buildNAType(), which is cnu template <class T> class HSPtrObj { public: @@ -170,7 +167,6 @@ public: // pt points to a single object. T *pt_; }; -// LCOV_EXCL_STOP template <class T> class HSPtrArray { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/ustat/vers_libustat.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/vers_libustat.cpp b/core/sql/ustat/vers_libustat.cpp index 2b41098..c4499b4 100644 --- a/core/sql/ustat/vers_libustat.cpp +++ b/core/sql/ustat/vers_libustat.cpp @@ -26,6 +26,4 @@ #define VERS_CV_MIN 0 #define VERS_CV_UPD 1 -// LCOV_EXCL_START VERS_LIB(libustat) -// LCOV_EXCL_STOP
