http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_bignum.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_bignum.cpp b/core/sql/exp/exp_bignum.cpp index 14187e5..c22f317 100644 --- a/core/sql/exp/exp_bignum.cpp +++ b/core/sql/exp/exp_bignum.cpp @@ -75,13 +75,11 @@ BigNum::~BigNum() #pragma warning (default : 4273) //warning elimination #pragma warning (disable : 4273) //warning elimination -// LCOV_EXCL_START Attributes * BigNum::newCopy() { BigNum * new_copy = new BigNum(); *new_copy = *this; return new_copy; -// LCOV_EXCL_STOP }; #pragma warning (default : 4273) //warning elimination @@ -95,11 +93,9 @@ Attributes * BigNum::newCopy(NAMemory * heap) #pragma warning (default : 4273) //warning elimination #pragma warning (disable : 4273) //warning elimination -// LCOV_EXCL_START void BigNum::copyAttrs(Attributes *source) { *this = *((BigNum *) source); - // LCOV_EXCL_STOP return; }; #pragma warning (default : 4273) //warning elimination @@ -156,7 +152,6 @@ void BigNum::fixup(Space * space, // Convert (i.e. copy) the Big Num from op_data[1] ("source") to op_data[0] ("this"). #pragma warning (disable : 4273) //warning elimination -// LCOV_EXCL_START short BigNum::conv(Attributes * source, char * op_data[]) { return BigNumHelper::ConvBigNumWithSignToBigNumWithSignHelper(((BigNum *) source)->getLength(), @@ -164,7 +159,6 @@ short BigNum::conv(Attributes * source, char * op_data[]) op_data[1], op_data[0]); } -// LCOV_EXCL_STOP #pragma warning (default : 4273) //warning elimination @@ -518,7 +512,6 @@ short BigNum::castFrom (Attributes * source, unsigned short * thisDataInShorts = (unsigned short *) op_data[0]; if ((sourceType >= REC_MIN_INTERVAL) && (sourceType <= REC_MAX_INTERVAL)) { - // LCOV_EXCL_START switch (source1->getLength()) { case SQL_SMALL_SIZE: sourceType = REC_BIN16_SIGNED; @@ -528,7 +521,6 @@ short BigNum::castFrom (Attributes * source, break; case SQL_LARGE_SIZE: sourceType = REC_BIN64_SIGNED; - // LCOV_EXCL_STOP break; } } @@ -539,7 +531,6 @@ short BigNum::castFrom (Attributes * source, switch (sourceType) { case REC_BIN16_SIGNED: { - // LCOV_EXCL_START if ( *((short *) op_data[1]) < 0) { #pragma nowarn(1506) // warning elimination thisDataInShorts[0] = -*((short *) op_data[1]); @@ -549,13 +540,11 @@ short BigNum::castFrom (Attributes * source, else { thisDataInShorts[0] = *((short *) op_data[1]); } - // LCOV_EXCL_STOP } break; case REC_BPINT_UNSIGNED: case REC_BIN16_UNSIGNED: { - // LCOV_EXCL_START thisDataInShorts[0] = *((unsigned short *) op_data[1]); } break; @@ -567,7 +556,6 @@ short BigNum::castFrom (Attributes * source, } else { *((ULng32 *) op_data[0]) = *((Lng32 *) op_data[1]); - // LCOV_EXCL_STOP } #ifdef NA_LITTLE_ENDIAN @@ -615,7 +603,6 @@ short BigNum::castFrom (Attributes * source, case REC_DECIMAL_LSE: { // Remember first char of source in temp - // LCOV_EXCL_START char temp = op_data[1][0]; // Temporarily suppress sign bit in source @@ -750,7 +737,6 @@ short BigNum::castFrom (Attributes * source, } break; - // LCOV_EXCL_STOP case REC_FLOAT64: { // The code below is modeled on the corresponding code in large decimals. @@ -881,7 +867,6 @@ short BigNum::castFrom (Attributes * source, #pragma warning (disable : 4273) //warning elimination -// LCOV_EXCL_START void BigNum::encode(const char * inBuf, char * outBuf, short desc) { char sign = BIGN_GET_SIGN(inBuf, getLength()); @@ -967,7 +952,6 @@ void BigNum::init(char * op_data, char * str) // Set sign bit if (str[0] == '-') BIGN_SET_SIGN(op_data, getLength()); - // LCOV_EXCL_STOP } #pragma warning (default : 4273) //warning elimination
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_clause.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_clause.cpp b/core/sql/exp/exp_clause.cpp index 8050450..af0d36d 100644 --- a/core/sql/exp/exp_clause.cpp +++ b/core/sql/exp/exp_clause.cpp @@ -1150,23 +1150,18 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_OR: return "ITM_OR"; // unary logic operators - // LCOV_EXCL_START case ITM_NOT: return "ITM_NOT"; case ITM_IS_TRUE: return "ITM_IS_TRUE"; case ITM_IS_FALSE: return "ITM_IS_FALSE"; - // LCOV_EXCL_STOP case ITM_IS_NULL: return "ITM_IS_NULL"; case ITM_IS_NOT_NULL: return "ITM_IS_NOT_NULL"; - // LCOV_EXCL_START case ITM_IS_UNKNOWN: return "ITM_IS_UNKNOWN"; case ITM_IS_NOT_UNKNOWN: return "ITM_IS_NOT_UNKNOWN"; - // LCOV_EXCL_STOP // binary comparison operators case ITM_EQUAL: return "ITM_EQUAL"; case ITM_NOT_EQUAL: return "ITM_NOT_EQUAL"; case ITM_LESS: return "ITM_LESS"; - // LCOV_EXCL_START case ITM_LESS_EQ: return "ITM_LESS_EQ"; case ITM_GREATER: return "ITM_GREATER"; case ITM_GREATER_EQ: return "ITM_GREATER_EQ"; @@ -1174,12 +1169,10 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) // unary arithmetic operators case ITM_NEGATE: return "ITM_NEGATE"; case ITM_INVERSE: return "ITM_INVERSE"; - // LCOV_EXCL_STOP // binary arithmetic operators case ITM_PLUS: return "ITM_PLUS"; case ITM_MINUS: return "ITM_MINUS"; case ITM_TIMES: return "ITM_TIMES"; - // LCOV_EXCL_START case ITM_DIVIDE: return "ITM_DIVIDE"; case ITM_EXPONENT: return "ITM_EXPONENT"; @@ -1205,23 +1198,18 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_PIVOT_GROUP: return "ITM_PIVOT_GROUP"; - // LCOV_EXCL_STOP case ITM_AGGR_MIN_MAX: return "ITM_AGGR_MIN_MAX"; case ITM_AGGR_GROUPING_FUNC: return "ITM_AGGR_GROUPING_FUNC"; // custom functions - // LCOV_EXCL_START case ITM_USER_DEF_FUNCTION: return "ITM_USER_DEF_FUNCTION"; case ITM_BETWEEN: return "ITM_BETWEEN"; - // LCOV_EXCL_STOP case ITM_LIKE: return "ITM_LIKE"; case ITM_REGEXP: return "ITM_REGEXP"; - // LCOV_EXCL_START case ITM_CURRENT_TIMESTAMP: return "ITM_CURRENT_TIMESTAMP"; case ITM_CURRENT_USER: return "ITM_CURRENT_USER"; case ITM_SESSION_USER: return "ITM_SESSION_USER"; case ITM_USER: return "ITM_USER"; - // LCOV_EXCL_STOP case ITM_AUTHNAME: return "ITM_AUTHNAME"; case ITM_AUTHTYPE: return "ITM_AUTHTYPE"; @@ -1231,14 +1219,11 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_CASE: return "ITM_CASE"; case ITM_IF_THEN_ELSE: return "ITM_IF_THEN_ELSE"; case ITM_RETURN_TRUE: return "ITM_RETURN_TRUE"; - // LCOV_EXCL_START case ITM_RETURN_FALSE: return "ITM_RETURN_FALSE"; case ITM_RETURN_NULL: return "ITM_RETURN_NULL"; - // LCOV_EXCL_STOP case ITM_COMP_ENCODE: return "ITM_COMP_ENCODE"; case ITM_COMP_DECODE: return "ITM_COMP_DECODE"; case ITM_HASH: return "ITM_HASH"; - // LCOV_EXCL_START case ITM_REPLACE_NULL: return "ITM_REPLACE_NULL"; case ITM_PACK_FUNC: return "ITM_PACK_FUNC"; case ITM_BITMUX: return "ITM_BITMUX"; @@ -1258,9 +1243,7 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_MOVING_MIN : return "ITM_MOVING_MIN"; case ITM_MOVING_SDEV : return "ITM_MOVING_SDEV"; case ITM_MOVING_VARIANCE : return "ITM_MOVING_VARIANCE"; - // LCOV_EXCL_STOP case ITM_OFFSET : return "ITM_OFFSET"; - // LCOV_EXCL_START case ITM_RUNNING_COUNT : return "ITM_RUNNING_COUNT"; case ITM_ROWS_SINCE : return "ITM_ROWS_SINCE"; case ITM_RUNNING_SUM : return "ITM_RUNNING_SUM"; @@ -1274,9 +1257,7 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) // flow control case ITM_DO_WHILE : return "ITM_DO_WHILE"; - // LCOV_EXCL_STOP case ITM_BLOCK : return "ITM_BLOCK"; - // LCOV_EXCL_START case ITM_WHILE : return "ITM_WHILE"; // scalar min/max @@ -1366,7 +1347,6 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_REPLACE_UNICODE: return "ITM_REPLACE_UNICODE"; case ITM_UNICODE_CODE_VALUE: return "ITM_UNICODE_CODE_VALUE"; case ITM_NCHAR_MP_CODE_VALUE: return "ITM_NCHAR_MP_CODE_VALUE"; - // LCOV_EXCL_STOP // translate function case ITM_TRANSLATE: return "ITM_TRANSLATE"; @@ -1375,7 +1355,6 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) // RowSet expression functions case ITM_ROWSETARRAY_SCAN: return "ITM_ROWSETARRAY_SCAN"; - // LCOV_EXCL_START case ITM_ROWSETARRAY_ROWID: return "ITM_ROWSETARRAY_ROWID"; case ITM_ROWSETARRAY_INTO : return "ITM_ROWSETARRAY_INTO"; @@ -1398,10 +1377,8 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_DAYOFYEAR: return "ITM_DAYOFYEAR"; case ITM_FIRSTDAYOFYEAR: return "ITM_FIRSTDAYOFYEAR"; case ITM_INTERNALTIMESTAMP: return "ITM_INTERNALTIMESTAMP"; - // LCOV_EXCL_STOP // misc. functions case ITM_NARROW: return "ITM_NARROW"; - // LCOV_EXCL_START case ITM_INTERVAL: return "ITM_INTERVAL"; case ITM_INSTANTIATE_NULL: return "ITM_INSTANTIATE_NULL"; case ITM_INCREMENT: return "ITM_INCREMENT"; @@ -1410,23 +1387,18 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_LESS_OR_LE: return "ITM_LESS_OR_LE"; case ITM_RANGE_LOOKUP: return "ITM_RANGE_LOOKUP"; case ITM_DECODE: return "ITM_DECODE"; - // LCOV_EXCL_STOP case ITM_HDPHASHCOMB: return "ITM_HDPHASHCOMB"; - // LCOV_EXCL_START case ITM_RANDOMNUM: return "ITM_RANDOMNUM"; case ITM_PROGDISTRIB: return "ITM_PROGDISTRIB"; - // LCOV_EXCL_STOP case ITM_HASHCOMB: return "ITM_HASHCOMB"; case ITM_HDPHASH: return "ITM_HDPHASH"; case ITM_EXEC_COUNT: return "ITM_EXEC_COUNT"; - // LCOV_EXCL_START case ITM_CURR_TRANSID: return "ITM_CURR_TRANSID"; case ITM_NOTCOVERED: return "ITM_NOTCOVERED"; case ITM_BALANCE: return "ITM_BALANCE"; case ITM_RAND_SELECTION: return "ITM_RAND_SELECTION"; case ITM_PROGDISTRIBKEY: return "ITM_PROGDISTRIBKEY"; case ITM_PAGROUP: return "ITM_PAGROUP"; - // LCOV_EXCL_STOP case ITM_HASH2_DISTRIB: return "ITM_HASH2_DISTRIB"; case ITM_HEADER: return "ITM_HEADER"; @@ -1475,7 +1447,6 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) // renaming, conversion, assignment case ITM_RENAME_COL: return "ITM_RENAME_COL"; - // LCOV_EXCL_STOP case ITM_CONVERT: return "ITM_CONVERT"; case ITM_CAST: return "ITM_CAST"; case ITM_ASSIGN: return "ITM_ASSIGN"; @@ -1485,7 +1456,6 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) // do a cast but adjust target length based // on operand (used by ODBC) - // LCOV_EXCL_START case ITM_CAST_CONVERT: return "ITM_CAST_CONVERT"; case ITM_CAST_TYPE: return "ITM_CAST_TYPE"; @@ -1543,7 +1513,6 @@ const char * getOperTypeEnumAsString(Int16 /*OperatorTypeEnum*/ ote) case ITM_SEQUENCE_VALUE: return "ITM_SEQUENCE_VALUE"; - // LCOV_EXCL_STOP // Note, this list is arranged in the same order as the types // appear in common/OperTypeEnum.h, please keep the same order // when adding new types @@ -1878,7 +1847,6 @@ ex_like_clause_doublebyte::ex_like_clause_doublebyte(OperatorTypeEnum oper_type, ///////////////////////////////////////////////////////////// // Methods to display Contents ///////////////////////////////////////////////////////////// -// LCOV_EXCL_START void ex_aggr_one_row_clause::displayContents(Space * space, const char * /*displayStr*/, Int32 clauseNum, char * constsArea) { ex_clause::displayContents(space, "ex_aggr_one_row_clause", clauseNum, constsArea); @@ -1888,7 +1856,6 @@ void ex_aggr_any_true_max_clause::displayContents(Space * space, const char * /* { ex_clause::displayContents(space, "ex_aggr_any_true_max_clause", clauseNum, constsArea); } -// LCOV_EXCL_STOP void ex_aggr_min_max_clause::displayContents(Space * space, const char * /*displayStr*/, Int32 clauseNum, char * constsArea) { ex_clause::displayContents(space, "ex_aggr_min_max_clause", clauseNum, constsArea); @@ -2038,7 +2005,6 @@ void ex_function_clause::displayContents(Space * space, const char * /*displaySt { ex_clause::displayContents(space, "ex_function_clause", clauseNum, constsArea); } -// LCOV_EXCL_START void ex_function_abs::displayContents(Space * space, const char * /*displayStr*/, Int32 clauseNum, char * constsArea) { ex_clause::displayContents(space, "ex_function_abs", clauseNum, constsArea); @@ -2053,7 +2019,6 @@ void ExFunctionBitOper::displayContents(Space * space, const char * /*displayStr { ex_clause::displayContents(space, "ExFunctionBitOper", clauseNum, constsArea); } -// LCOV_EXCL_STOP void ex_inout_clause::displayContents(Space * space, const char * /*displayStr*/, Int32 clauseNum, char * constsArea) { ex_clause::displayContents(space, "ex_inout_clause", clauseNum, constsArea); @@ -2080,7 +2045,6 @@ void ExRegexpClauseChar::displayContents(Space * space, const char * /*displaySt ex_clause::displayContents(space, "ExRegexpClauseChar", clauseNum, constsArea); } -// LCOV_EXCL_START void ex_like_clause_doublebyte::displayContents(Space * space, const char * /*displayStr*/, Int32 clauseNum, char * constsArea) { ex_clause::displayContents(space, "ex_like_clause_doublebyte", clauseNum, constsArea); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_comp.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_comp.cpp b/core/sql/exp/exp_comp.cpp index 90fc7f8..82a57ae 100644 --- a/core/sql/exp/exp_comp.cpp +++ b/core/sql/exp/exp_comp.cpp @@ -164,10 +164,8 @@ ex_comp_clause::processResult(Int32 compare_code, Lng32* result, break; default: - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP break; } return ex_expr::EXPR_OK; @@ -209,7 +207,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case EQ_BIN16S_BIN16U: *(Lng32 *)op_data[0] = (*(short *)op_data[1] == *(unsigned short *)op_data[2]); break; - // LCOV_EXCL_START case EQ_BIN16S_BIN32U: *(Lng32 *)op_data[0] = ((ULng32)*(short *)op_data[1] == *(ULng32 *)op_data[2]); break; @@ -219,7 +216,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case EQ_BIN16U_BIN16S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] == *(short *)op_data[2]); break; - // LCOV_EXCL_STOP case EQ_BIN16U_BIN32S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] == *(Lng32 *)op_data[2]); break; @@ -229,10 +225,8 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case EQ_BIN16U_BIN32U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] == *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case EQ_BIN32S_BIN16S: @@ -262,10 +256,8 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case EQ_BIN32U_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(ULng32 *)op_data[1] == *(unsigned short *)op_data[2]); break; - // LCOV_EXCL_STOP case EQ_BIN32U_BIN32U: *(Lng32 *)op_data[0] = (*(ULng32 *)op_data[1] == *(ULng32 *)op_data[2]); @@ -330,17 +322,14 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case NE_BIN16S_BIN16S: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(short *)op_data[1] != *(short *)op_data[2]); break; - // LCOV_EXCL_STOP case NE_BIN16S_BIN32S: *(Lng32 *)op_data[0] = (*(short *)op_data[1] != *(Lng32 *)op_data[2]); break; case NE_BIN16S_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(short *)op_data[1] != *(unsigned short *)op_data[2]); break; @@ -357,16 +346,13 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case NE_BIN16U_BIN32S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] != *(Lng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case NE_BIN16U_BIN16U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] != *(unsigned short *)op_data[2]); break; case NE_BIN16U_BIN32U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] != *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case NE_BIN32S_BIN16S: @@ -396,10 +382,8 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case NE_BIN32U_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(ULng32 *)op_data[1] != *(unsigned short *)op_data[2]); break; - // LCOV_EXCL_STOP case NE_BIN32U_BIN32U: *(Lng32 *)op_data[0] = (*(ULng32 *)op_data[1] != *(ULng32 *)op_data[2]); break; @@ -430,14 +414,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case NE_UNICODE_F_F: // 11/3/97: Added for Unicode support - // LCOV_EXCL_START if (wc_str_cmp((NAWchar*)op_data[1], (NAWchar*)op_data[2], (Int32)getOperand(1)->getLength() >> 1) != 0) *(Lng32 *)op_data[0] = 1; else *(Lng32 *)op_data[0] = 0; break; - // LCOV_EXCL_STOP case NE_FLOAT32_FLOAT32: *(Lng32 *)op_data[0] = (*(float *)op_data[1] != *(float *)op_data[2]); break; @@ -486,14 +468,11 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case LT_BIN16U_BIN16S: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] < *(short *)op_data[2]); break; - // LCOV_EXCL_STOP case LT_BIN16U_BIN32S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] < *(Lng32 *)op_data[2]); break; - // LCOV_EXCL_START case LT_BIN16U_BIN16U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] < *(unsigned short *)op_data[2]); break; @@ -501,7 +480,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case LT_BIN16U_BIN32U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] < *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case LT_BIN32S_BIN16S: @@ -513,14 +491,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case LT_BIN32S_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(Lng32 *)op_data[1] < *(unsigned short *)op_data[2]); break; case LT_BIN32S_BIN32U: *(Lng32 *)op_data[0] = ((Int64)*(Lng32 *)op_data[1] < (Int64)*(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case LT_BIN32U_BIN16S: @@ -665,24 +641,20 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case LE_BIN16U_BIN16S: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] <= *(short *)op_data[2]); break; - // LCOV_EXCL_STOP case LE_BIN16U_BIN32S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] <= *(Lng32 *)op_data[2]); break; case LE_BIN16U_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] <= *(unsigned short *)op_data[2]); break; case LE_BIN16U_BIN32U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] <= *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case LE_BIN32S_BIN16S: @@ -694,14 +666,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case LE_BIN32S_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(Lng32 *)op_data[1] <= *(unsigned short *)op_data[2]); break; case LE_BIN32S_BIN32U: *(Lng32 *)op_data[0] = ((Int64)*(Lng32 *)op_data[1] <= (Int64)*(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case LE_BIN32U_BIN16S: @@ -765,7 +735,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], else { // first operand is negative - // LCOV_EXCL_START if ((op_data[2][0] & 0200) == 0) { // second operand is positive @@ -780,7 +749,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], else *(Lng32 *)op_data[0] = 1; } - // LCOV_EXCL_STOP } // first operand is negative } break; @@ -858,14 +826,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case GT_BIN16U_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] > *(unsigned short *)op_data[2]); break; case GT_BIN16U_BIN32U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] > *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case GT_BIN32S_BIN16S: @@ -877,14 +843,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case GT_BIN32S_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(Lng32 *)op_data[1] > *(unsigned short *)op_data[2]); break; case GT_BIN32S_BIN32U: *(Lng32 *)op_data[0] = ((Int64)*(Lng32 *)op_data[1] > (Int64)*(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case GT_BIN32U_BIN16S: @@ -974,14 +938,12 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], case GT_UNICODE_F_F: // 11/3/97: added for Unicode - // LCOV_EXCL_START if (wc_str_cmp((NAWchar*)op_data[1], (NAWchar*)op_data[2], (Int32)(getOperand(1)->getLength()) >>1) > 0) *(Lng32 *)op_data[0] = 1; else *(Lng32 *)op_data[0] = 0; break; - // LCOV_EXCL_STOP case GT_FLOAT32_FLOAT32: *(Lng32 *)op_data[0] = (*(float *)op_data[1] > *(float *)op_data[2]); @@ -1017,7 +979,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], break; case GE_BIN16S_BIN32S: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(short *)op_data[1] >= *(Lng32 *)op_data[2]); break; @@ -1025,29 +986,24 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], *(Lng32 *)op_data[0] = (*(short *)op_data[1] >= *(unsigned short *)op_data[2]); break; - // LCOV_EXCL_STOP case GE_BIN16S_BIN32U: *(Lng32 *)op_data[0] = (*(short *)op_data[1] >= (Int64)*(ULng32 *)op_data[2]); break; case GE_BIN16U_BIN16S: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] >= *(short *)op_data[2]); break; - // LCOV_EXCL_STOP case GE_BIN16U_BIN32S: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] >= *(Lng32 *)op_data[2]); break; case GE_BIN16U_BIN16U: - // LCOV_EXCL_START *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] >= *(unsigned short *)op_data[2]); break; case GE_BIN16U_BIN32U: *(Lng32 *)op_data[0] = (*(unsigned short *)op_data[1] >= *(ULng32 *)op_data[2]); break; - // LCOV_EXCL_STOP case GE_BIN32S_BIN16S: @@ -1252,7 +1208,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], // this comparison operation not supported. // See if it could still be evaluated by doing some intermediate // operations. - // LCOV_EXCL_START if (evalUnsupportedOperations(op_data, heap, diagsArea) != ex_expr::EXPR_OK) return ex_expr::EXPR_ERROR; @@ -1263,7 +1218,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); retcode = ex_expr::EXPR_ERROR; break; - // LCOV_EXCL_STOP } if ((getRollupColumnNum() >= 0) && @@ -1276,7 +1230,6 @@ ex_expr::exp_return_type ex_comp_clause::eval(char *op_data[], return retcode; } -// LCOV_EXCL_START ex_expr::exp_return_type ex_comp_clause::evalUnsupportedOperations( char *op_data[], CollHeap *heap, @@ -1290,7 +1243,6 @@ ex_expr::exp_return_type ex_comp_clause::evalUnsupportedOperations( ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_conv.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_conv.cpp b/core/sql/exp/exp_conv.cpp index d1f131b..ecda9c2 100644 --- a/core/sql/exp/exp_conv.cpp +++ b/core/sql/exp/exp_conv.cpp @@ -102,11 +102,9 @@ void double_varchar_length( { if (varCharLenSize == sizeof(Lng32)) { Lng32 x; - // LCOV_EXCL_START str_cpy_all((char*)&x, varCharLen, sizeof(Lng32)); x *= BYTES_PER_NAWCHAR; str_cpy_all(varCharLen, (char *)&x, sizeof(Lng32)); - // LCOV_EXCL_STOP } else { short x; str_cpy_all((char*)&x, varCharLen, sizeof(short)); @@ -248,7 +246,6 @@ if ((intermediate < LLONG_MAX/scaleFactor) && { intermediate = intermediate * scaleFactor; } -// LCOV_EXCL_START else if (dataConversionErrorFlag) { if (intermediate > 0) @@ -270,7 +267,6 @@ else sourceLen, sourceType, 0, targetType, flags); return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP // now move converted intermediate to target @@ -1063,7 +1059,6 @@ ex_expr::exp_return_type convLargeDecToAscii(char *target, if(source[0] < 2) { unsigned short realSource[256]; - // LCOV_EXCL_START str_cpy_all((char *)realSource, source, sourceLen); if(realSource[0]) source[0] = '-'; @@ -1081,7 +1076,6 @@ ex_expr::exp_return_type convLargeDecToAscii(char *target, r <<= 16; } source[srcPos] = (char)(r >>= 16); - // LCOV_EXCL_STOP } } @@ -1376,7 +1370,6 @@ ex_expr::exp_return_type convAsciiToDatetime(char *target, } -// LCOV_EXCL_START ex_expr::exp_return_type convUnicodeToDatetime(char *target, Lng32 targetLen, REC_DATETIME_CODE code, @@ -1421,7 +1414,6 @@ ex_expr::exp_return_type convUnicodeToDatetime(char *target, return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP // convDatetimeDatetime() ============================================ // This function supports any datetime to datetime conversions with @@ -1720,31 +1712,25 @@ ex_expr::exp_return_type convAsciiToFloat64(char * target, if (NOT validNum) { - // LCOV_EXCL_START char hexstr[MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN]; ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR,NULL,NULL,NULL,NULL,stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP }; double scale = MathPow(10.0, (double)numScale, err); if (isinf(scale)) { - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source, sourceLen, REC_BYTE_F_ASCII, SQLCHARSETCODE_ISO88591, REC_FLOAT64, flags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } if (err) { - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source, sourceLen, REC_BYTE_F_ASCII, SQLCHARSETCODE_ISO88591,REC_FLOAT64, flags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } if (negMantissa) @@ -2175,7 +2161,6 @@ ex_expr::exp_return_type convAsciiToDec(char *target, // only blanks found, error if (sourceStart == sourceLen) { - // LCOV_EXCL_START if (flags & CONV_TREAT_ALL_SPACES_AS_ZERO) { // pad the target with zeros @@ -2192,7 +2177,6 @@ ex_expr::exp_return_type convAsciiToDec(char *target, return ex_expr::EXPR_ERROR; }; - // LCOV_EXCL_STOP // skip trailing blanks. We know that we found already some // non-blank character, thus sourceLen is always > sourceStart @@ -2221,7 +2205,6 @@ ex_expr::exp_return_type convAsciiToDec(char *target, // scale the intermediate for (Lng32 j = 0; j < targetScale; j++) { - // LCOV_EXCL_START intermediate *= 10.0; if ((intermediate < LLONG_MIN) || (intermediate > LLONG_MAX)) { @@ -2230,7 +2213,6 @@ ex_expr::exp_return_type convAsciiToDec(char *target, SQLCHARSETCODE_ISO88591, REC_DECIMAL_UNSIGNED, flags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP }; } @@ -3405,11 +3387,9 @@ ex_expr::exp_return_type convBigNumToBigNum(char *target, if (sign) { - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_UNSIGNED_OVERFLOW); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } @@ -3419,12 +3399,10 @@ ex_expr::exp_return_type convBigNumToBigNum(char *target, target); if (retCode== -1) { // target is not long enough - overflow - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source, sourceLen, REC_NUM_BIG_SIGNED, 0, REC_NUM_BIG_SIGNED, flags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP }; return ex_expr::EXPR_OK; @@ -3492,7 +3470,6 @@ ex_expr::exp_return_type convDecToInt64(Int64 &target, ////////////////////////////////////////////////////////////////// // function to convert Decimal to Decimal /////////////////////////////////////////////////////////////////// -// LCOV_EXCL_START ex_expr::exp_return_type convDecToDec(char *target, Lng32 targetLen, char *source, @@ -3652,7 +3629,6 @@ ex_expr::exp_return_type convDecLStoAscii(char *target, return ex_expr::EXPR_OK; }; -// LCOV_EXCL_STOP ////////////////////////////////////////////////////////////////// // This function returns an int64 with the minimum value that @@ -4336,14 +4312,12 @@ NAWchar * wc_str_find_first_nonblank(NAWchar *s, Lng32 len) { //////////////////////////////////////////////// // find the first non zero(character 0) character //////////////////////////////////////////////// -// LCOV_EXCL_START char* str_find_first_nonzero(char* s, Lng32 len) { for (Lng32 i = 0; i< len; i++) if (s[i] != '0') return &s[i]; return 0; } -// LCOV_EXCL_STOP void setVCLength(char * VCLen, Lng32 VCLenSize, ULng32 value) { if (VCLenSize == sizeof(short)) { @@ -4422,7 +4396,6 @@ unicodeToSByteTarget( if (first_nonblank) // if truncated portion isn't all blanks { - // LCOV_EXCL_START if (dataConversionErrorFlag) // want conversion flag instead of warning? { // yes - determine whether target is greater than or less than source @@ -4431,7 +4404,6 @@ unicodeToSByteTarget( *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP; else *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; - // LCOV_EXCL_STOP } else // no - raise a warning @@ -4494,7 +4466,6 @@ unicodeToMByteTarget( NADELETE(cBuf, charBuf, heap); } else { - // LCOV_EXCL_START convertedLen = 0; copyLen = 0; @@ -4509,7 +4480,6 @@ unicodeToMByteTarget( *(*diagsArea) << DgString0("UNICODE") << DgString1("SJIS") << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); } retcode = ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } @@ -4524,12 +4494,10 @@ unicodeToMByteTarget( // TBD - if needed some day: If only blanks are truncated, don't // generate an error. - // LCOV_EXCL_START if (dataConversionErrorFlag) *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED; else ExRaiseSqlWarning(heap, diagsArea, EXE_STRING_OVERFLOW); - // LCOV_EXCL_STOP } // If requested, blank pad so we don't leave garbage at end of target buf if ( padSpace == TRUE && targetLen > copyLen ) @@ -4630,7 +4598,6 @@ ex_expr::exp_return_type convCharToChar( if (rc && rc != CNV_ERR_BUFFER_OVERRUN) { - // LCOV_EXCL_START ExeErrorCode errCode = EXE_INVALID_CHAR_IN_TRANSLATE_FUNC; if (rc != CNV_ERR_INVALID_CHAR) @@ -4645,7 +4612,6 @@ ex_expr::exp_return_type convCharToChar( if (intermediateStr && intermediateStr != stackBuffer) NADELETEBASIC(intermediateStr, heap); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } if (rc || (targetPrecision && targetPrecision < (Lng32) translatedCharCnt)) @@ -4663,7 +4629,7 @@ ex_expr::exp_return_type convCharToChar( (Int32)outputDataLen, (Int32)targetPrecision, ignoreTrailingBlanksInSource); - assert((Int32)outputDataLen >= 0); //LCOV_EXCL_LINE : rfi + assert((Int32)outputDataLen >= 0); firstUntranslatedChar = &utf8Tgt[outputDataLen]; } else @@ -4674,11 +4640,9 @@ ex_expr::exp_return_type convCharToChar( if (ignoreTrailingBlanksInSource) { // check whether the characters from firstUntranslatedChar onwards are all blanks - // LCOV_EXCL_START remainingScanStringLen = input_length - (firstUntranslatedChar - input_to_scan); canIgnoreOverflowChars = !(str_find_first_nonblank(firstUntranslatedChar, remainingScanStringLen)); - // LCOV_EXCL_STOP } if (!canIgnoreOverflowChars) @@ -5769,7 +5733,6 @@ convDoIt(char * source, { if (*(unsigned short *)source > limits[targetPrecision-1]) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = limits[targetPrecision-1]; @@ -5781,7 +5744,6 @@ convDoIt(char * source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else @@ -5797,10 +5759,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(short *)target = SHRT_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -5881,11 +5841,9 @@ convDoIt(char * source, break; case CONV_BIN16U_BIN32U: { - // LCOV_EXCL_START *(ULng32 *)target = *(unsigned short *)source; }; break; - // LCOV_EXCL_STOP case CONV_BIN16U_BIN64S: { *(Int64 *)target = *(unsigned short *)source; @@ -6017,7 +5975,6 @@ convDoIt(char * source, { if (*(Lng32 *)source < 0) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = 0; @@ -6028,11 +5985,9 @@ convDoIt(char * source, ExRaiseSqlError(heap, diagsArea, EXE_UNSIGNED_OVERFLOW); return ex_expr::EXPR_ERROR; } - // LCOV_EXCL_STOP } else if (*(Lng32 *)source > (Lng32)limits[targetPrecision-1]) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = limits[targetPrecision-1]; @@ -6044,7 +5999,6 @@ convDoIt(char * source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else @@ -6264,7 +6218,6 @@ convDoIt(char * source, case CONV_BIN32U_BPINTU: { - // LCOV_EXCL_START if (*(ULng32 *)source > (ULng32)limits[targetPrecision-1]) { if (dataConversionErrorFlag != 0) @@ -6286,7 +6239,6 @@ convDoIt(char * source, } } break; - // LCOV_EXCL_STOP case CONV_BIN32U_BIN16S: { if (*(ULng32 *)source > SHRT_MAX) @@ -6534,7 +6486,6 @@ convDoIt(char * source, { if (*(Int64 *)source < 0) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = 0; @@ -6546,10 +6497,8 @@ convDoIt(char * source, return ex_expr::EXPR_ERROR; } } - // LCOV_EXCL_STOP else if (*(Int64 *)source > (Int64)limits[targetPrecision-1]) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = limits[targetPrecision-1]; @@ -6561,7 +6510,6 @@ convDoIt(char * source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else @@ -7258,7 +7206,6 @@ convDoIt(char * source, case CONV_FLOAT32_BPINTU: { - // LCOV_EXCL_START float floatsource = *floatSrcPtr; if (floatsource < 0) { @@ -7311,7 +7258,6 @@ convDoIt(char * source, } } break; - // LCOV_EXCL_STOP case CONV_FLOAT32_BIN16S: { float floatsource = *floatSrcPtr; @@ -7319,10 +7265,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(short *)target = SHRT_MIN; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -7336,10 +7280,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(short *)target = SHRT_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -7362,9 +7304,7 @@ convDoIt(char * source, #pragma warning (default : 4244) //warning elimination if (floatsource2 > floatsource) { - // LCOV_EXCL_START *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP; - // LCOV_EXCL_STOP } else { @@ -7404,10 +7344,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(unsigned short *)target = 0; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -7419,10 +7357,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(unsigned short *)target = USHRT_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -7440,7 +7376,6 @@ convDoIt(char * source, // Convert back and check for a value change. #pragma warning (disable : 4244) //warning elimination #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START float floatsource2 = int64source; #pragma warn(1506) // warning elimination #pragma warning (default : 4244) //warning elimination @@ -7453,7 +7388,6 @@ convDoIt(char * source, if (floatsource2 < floatsource) { *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; - // LCOV_EXCL_STOP } } } @@ -7487,10 +7421,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(Lng32 *)target = INT_MIN; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -7504,10 +7436,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(Lng32 *)target = INT_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -7581,7 +7511,6 @@ convDoIt(char * source, } else if (floatsource > UINT_MAX) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) // Capture error in variable? { *(ULng32 *)target = UINT_MAX; @@ -7593,7 +7522,6 @@ convDoIt(char * source, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else @@ -7647,7 +7575,6 @@ convDoIt(char * source, float floatsource = *floatSrcPtr; if (floatsource < LLONG_MIN) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) // Capture error in variable? { *(Int64 *)target = LLONG_MIN; @@ -7659,12 +7586,10 @@ convDoIt(char * source, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else if (floatsource > LLONG_MAX) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) // Capture error in variable? { *(Int64 *)target = LLONG_MAX; @@ -7677,7 +7602,6 @@ convDoIt(char * source, targetType, tempFlags); return ex_expr::EXPR_ERROR; } - // LCOV_EXCL_STOP } else { @@ -7687,7 +7611,6 @@ convDoIt(char * source, // Convert back and check for a value change. #pragma warning (disable : 4244) //warning elimination #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START float floatsource2 = int64source; #pragma warn(1506) // warning elimination #pragma warning (default : 4244) //warning elimination @@ -7701,7 +7624,6 @@ convDoIt(char * source, { *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; } - // LCOV_EXCL_STOP } } if ((dataConversionErrorFlag != 0) || @@ -7810,10 +7732,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) { - // LCOV_EXCL_START setMinDecValue(target, targetLen, targetType); *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -7842,7 +7762,6 @@ convDoIt(char * source, } else { - // LCOV_EXCL_START Int64 int64source = (Int64) floatsource; if (dataConversionErrorFlag != 0) { @@ -7875,7 +7794,6 @@ convDoIt(char * source, } } break; - // LCOV_EXCL_STOP case CONV_FLOAT32_FLOAT32: { *floatTgtPtr = *floatSrcPtr; }; @@ -7888,11 +7806,9 @@ convDoIt(char * source, case CONV_FLOAT32_ASCII: { if (targetLen < SQL_REAL_MIN_DISPLAY_SIZE) { - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_STRING_OVERFLOW, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP }; // double intermediate = (double) *(float *) source; @@ -7907,11 +7823,9 @@ convDoIt(char * source, varCharLen, varCharLenSize, leftPad) != 0) { - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_STRING_OVERFLOW, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } }; break; @@ -7921,7 +7835,6 @@ convDoIt(char * source, double doublesource = *doubleSrcPtr; if (doublesource < 0) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) { *(unsigned short *)target = 0; @@ -7931,17 +7844,14 @@ convDoIt(char * source, { ExRaiseSqlError(heap, diagsArea, EXE_UNSIGNED_OVERFLOW); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else if (doublesource > limits[targetPrecision-1]) { if (dataConversionErrorFlag != 0) { - // LCOV_EXCL_START *(unsigned short *)target = limits[targetPrecision-1]; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -7982,10 +7892,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(short *)target = SHRT_MIN; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -8023,9 +7931,7 @@ convDoIt(char * source, #pragma warning (default : 4244) //warning elimination if (doublesource2 > doublesource) { - // LCOV_EXCL_START *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP; - // LCOV_EXCL_STOP } else { @@ -8065,10 +7971,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(unsigned short *)target = 0; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -8080,10 +7984,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(unsigned short *)target = USHRT_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -8101,7 +8003,6 @@ convDoIt(char * source, #pragma warning (disable : 4244) //warning elimination // Convert back and check for a value change. #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START double doublesource2 = int64source; #pragma warn(1506) // warning elimination #pragma warning (default : 4244) //warning elimination @@ -8115,7 +8016,6 @@ convDoIt(char * source, { *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; } - // LCOV_EXCL_STOP } } if ((dataConversionErrorFlag != 0) || @@ -8303,7 +8203,6 @@ convDoIt(char * source, double doublesource = *doubleSrcPtr; if (doublesource < LLONG_MIN) { - // LCOV_EXCL_START if (dataConversionErrorFlag != 0) // Capture error in variable? { *(Int64 *)target = LLONG_MIN; @@ -8315,17 +8214,14 @@ convDoIt(char * source, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } else if (doublesource > LLONG_MAX) { if (dataConversionErrorFlag != 0) // Capture error in variable? { - // LCOV_EXCL_START *(Int64 *)target = LLONG_MAX; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -8343,7 +8239,6 @@ convDoIt(char * source, // Convert back and check for a value change. #pragma warning (disable : 4244) //warning elimination #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START double doublesource2 = int64source; #pragma warn(1506) // warning elimination #pragma nowarn(1506) // warning elimination @@ -8359,7 +8254,6 @@ convDoIt(char * source, { *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; } - // LCOV_EXCL_STOP } } if ((dataConversionErrorFlag != 0) || @@ -8468,10 +8362,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) { - // LCOV_EXCL_START setMinDecValue(target, targetLen, targetType); *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP_TO_MIN; - // LCOV_EXCL_STOP } else { @@ -8487,10 +8379,8 @@ convDoIt(char * source, { if (dataConversionErrorFlag != 0) { - // LCOV_EXCL_START setMaxDecValue(target, targetLen); *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; - // LCOV_EXCL_STOP } else { @@ -8508,7 +8398,6 @@ convDoIt(char * source, // Convert back and check for a value change. #pragma warning (disable : 4244) //warning elimination #pragma nowarn(1506) // warning elimination - // LCOV_EXCL_START double doublesource2 = int64source; #pragma warn(1506) // warning elimination #pragma warning (default : 4244) //warning elimination @@ -8522,7 +8411,6 @@ convDoIt(char * source, { *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; } - // LCOV_EXCL_STOP } } if (convInt64ToDec(target, @@ -8599,11 +8487,9 @@ convDoIt(char * source, { if (ov) { - // LCOV_EXCL_START ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source, sourceLen, sourceType, sourceScale, targetType, tempFlags); - // LCOV_EXCL_STOP return ex_expr::EXPR_ERROR; } } @@ -8613,7 +8499,6 @@ convDoIt(char * source, if (ov == 1) // overflow { - // LCOV_EXCL_START if (doubleTarget < 0) // < -DBL_MAX { *doubleTgtPtr = -DBL_MAX; @@ -8626,11 +8511,9 @@ convDoIt(char * source, *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN_TO_MAX; } - // LCOV_EXCL_STOP } // overflow else if (ov == -1) // underflow { - // LCOV_EXCL_START if (doubleTarget < 0) // > -DBL_MIN { *doubleTgtPtr = 0; @@ -8642,7 +8525,6 @@ convDoIt(char * source, *doubleTgtPtr = 0; *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; - // LCOV_EXCL_STOP } } // underflow } // data conversion flag @@ -8943,7 +8825,6 @@ convDoIt(char * source, tempFlags | CONV_INTERMEDIATE_CONVERSION) != ex_expr::EXPR_OK) { //if a EXE_NUMERIC OVERFLOW error was generated during the conversion, //change it to a warning. - // LCOV_EXCL_START if (*diagsArea) { Lng32 errorMark2 = (*diagsArea)->getNumber(DgSqlCode::ERROR_); Int32 counter = errorMark2 - errorMark; @@ -8960,7 +8841,6 @@ convDoIt(char * source, heap->deallocateMemory((void *)intermediate); return ex_expr::EXPR_ERROR; } - // LCOV_EXCL_STOP } @@ -9021,7 +8901,6 @@ convDoIt(char * source, break; case CONV_DECLS_DECLS: { - // LCOV_EXCL_START if (targetLen < sourceLen) { // overflow ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source, @@ -9119,7 +8998,6 @@ convDoIt(char * source, return ex_expr::EXPR_OK; }; break; - // LCOV_EXCL_STOP case CONV_INTERVALY_INTERVALMO: // convert years to months { if (convBinToBinScaleMult(target, @@ -10502,7 +10380,6 @@ convDoIt(char * source, ExRaiseSqlError(heap, diagsArea, EXE_STRING_OVERFLOW); } else { - // LCOV_EXCL_START convLen = 0; copyLen = 0; if ( varCharLen ) @@ -10511,7 +10388,6 @@ convDoIt(char * source, ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR,NULL, NULL, NULL, NULL, stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } }; break; @@ -10522,7 +10398,6 @@ convDoIt(char * source, case CONV_SJIS_V_UNICODE_V: { Lng32 copyLen, convertedLen; - // LCOV_EXCL_START const charBuf cBuf((unsigned char*)source, sourceLen, heap); NAWcharBuf *wBuf = NULL; @@ -10547,12 +10422,10 @@ convDoIt(char * source, { // yes - determine whether target is greater than or less than source // note assumption: UNICODE character set - // LCOV_EXCL_START if (*first_nonblank < unicode_char_set::space_char()) *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP; else *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_DOWN; - // LCOV_EXCL_STOP } else // no - raise a warning @@ -10563,12 +10436,9 @@ convDoIt(char * source, NADELETE(wBuf, NAWcharBuf, heap); } else { - // LCOV_EXCL_START convertedLen = 0; copyLen = 0; - // LCOV_EXCL_STOP } - // LCOV_EXCL_STOP // There is no need to change the char string storage format // for Unicode string. @@ -10776,7 +10646,6 @@ convDoIt(char * source, case CONV_ANSI_V_UNICODE_TO_ASCII_V: // ansi unicode (null terminalted)-> ascii { - // LCOV_EXCL_START NAWchar* w_source = (NAWchar*)source; Lng32 w_sourceLen = sourceLen/BYTES_PER_NAWCHAR; @@ -10791,7 +10660,6 @@ convDoIt(char * source, sourceLen = i*BYTES_PER_NAWCHAR; } - // LCOV_EXCL_STOP //fall through @@ -11975,7 +11843,6 @@ ex_expr::exp_return_type scaleDoIt(char *operand, break; default: return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP }; Lng32 scale = operandCurrScale - newScale; @@ -12006,7 +11873,6 @@ ex_expr::exp_return_type scaleDoIt(char *operand, // Check for overflow. TBD. while (scale--) intermediateDouble /= 10; } - // LCOV_EXCL_START else if (intermediateString != 0) { if (DFS2REC::isBigNum(operandType)) { @@ -12044,13 +11910,11 @@ ex_expr::exp_return_type scaleDoIt(char *operand, NADELETEBASIC(intermediateString, heap); return ex_expr::EXPR_ERROR; } - // LCOV_EXCL_STOP } } // decimal } // intermediateString != 0 else if (decimalString != 0) { - // LCOV_EXCL_START decimalString = new (heap) char[operandLen]; memset(decimalString, '0', operandLen); if (scale > 0) { //downscale @@ -12076,7 +11940,6 @@ ex_expr::exp_return_type scaleDoIt(char *operand, else { NADELETEBASIC(decimalString, heap); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } } } @@ -12103,10 +11966,8 @@ ex_expr::exp_return_type scaleDoIt(char *operand, } break; case REC_FLOAT32: { - // LCOV_EXCL_START floatOperandPtr = (float *)operand; *floatOperandPtr = (float)intermediateDouble; - // LCOV_EXCL_STOP } break; case REC_FLOAT64: { @@ -12128,13 +11989,11 @@ ex_expr::exp_return_type scaleDoIt(char *operand, operand[0] |= 0x80; break; }; - // LCOV_EXCL_STOP return ex_expr::EXPR_OK; }; -// LCOV_EXCL_START ex_expr::exp_return_type swapBytes(Attributes *attr, void *ptr) { @@ -12189,4 +12048,3 @@ ex_expr::exp_return_type swapBytes(Attributes *attr, } return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_datetime.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_datetime.cpp b/core/sql/exp/exp_datetime.cpp index 0d3f55e..57fb8ff 100644 --- a/core/sql/exp/exp_datetime.cpp +++ b/core/sql/exp/exp_datetime.cpp @@ -172,27 +172,23 @@ ExpDatetime::ExpDatetime() ExpDatetime::~ExpDatetime() { } -// LCOV_EXCL_START Attributes * ExpDatetime::newCopy() { ExpDatetime * new_copy = new ExpDatetime(); *new_copy = *this; return new_copy; }; -// LCOV_EXCL_STOP Attributes * ExpDatetime::newCopy(CollHeap * heap) { ExpDatetime * new_copy = new(heap) ExpDatetime(); *new_copy = *this; return new_copy; }; -// LCOV_EXCL_START void ExpDatetime::copyAttrs(Attributes *source_) // copy source attrs to this. { *this = *((ExpDatetime *)source_); return; }; -// LCOV_EXCL_STOP ExpDatetime * ExpDatetime::castToExpDatetime() { @@ -255,7 +251,6 @@ short ExpDatetime::getDatetimeFields(Lng32 datetimeCode, case REC_DTCODE_YEAR_SECOND: startField = REC_DATE_YEAR; break; - // LCOV_EXCL_START case REC_DTCODE_MONTH: case REC_DTCODE_MONTH_DAY: case REC_DTCODE_MONTH_HOUR: @@ -269,14 +264,12 @@ short ExpDatetime::getDatetimeFields(Lng32 datetimeCode, case REC_DTCODE_DAY_SECOND: startField = REC_DATE_DAY; break; - // LCOV_EXCL_STOP case REC_DTCODE_TIME: case REC_DTCODE_HOUR: case REC_DTCODE_HOUR_MINUTE: case REC_DTCODE_HOUR_SECOND: startField = REC_DATE_HOUR; break; - // LCOV_EXCL_START case REC_DTCODE_MINUTE: case REC_DTCODE_MINUTE_SECOND: startField = REC_DATE_MINUTE; @@ -287,17 +280,14 @@ short ExpDatetime::getDatetimeFields(Lng32 datetimeCode, default: return -1; } - // LCOV_EXCL_STOP switch (datetimeCode) { case REC_DTCODE_YEAR: endField = REC_DATE_YEAR; break; - // LCOV_EXCL_START case REC_DTCODE_YEAR_MONTH: case REC_DTCODE_MONTH: endField = REC_DATE_MONTH; - // LCOV_EXCL_STOP break; case REC_DTCODE_DATE: case REC_DTCODE_YEAR_DAY: @@ -305,7 +295,6 @@ short ExpDatetime::getDatetimeFields(Lng32 datetimeCode, case REC_DTCODE_DAY: endField = REC_DATE_DAY; break; - // LCOV_EXCL_START case REC_DTCODE_YEAR_HOUR: case REC_DTCODE_MONTH_HOUR: case REC_DTCODE_DAY_HOUR: @@ -319,7 +308,6 @@ short ExpDatetime::getDatetimeFields(Lng32 datetimeCode, case REC_DTCODE_MINUTE: endField = REC_DATE_MINUTE; break; - // LCOV_EXCL_STOP case REC_DTCODE_TIMESTAMP: case REC_DTCODE_YEAR_SECOND: case REC_DTCODE_MONTH_SECOND: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_expr.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_expr.cpp b/core/sql/exp/exp_expr.cpp index 97d7ce0..c8d6340 100644 --- a/core/sql/exp/exp_expr.cpp +++ b/core/sql/exp/exp_expr.cpp @@ -101,7 +101,6 @@ Lng32 ex_expr::initExpr() return rc; } -// LCOV_EXCL_START // lean expressions are not used not tested void ex_expr_lean::displayContents(Space * space, short mode, const char * displayStr, @@ -163,7 +162,6 @@ void ex_expr_lean::displayContents(Space * space, short mode, } } } -// LCOV_EXCL_STOP // make a 'lean' copy of 'this' and point it back to itself. Supports all // expressions. Do not copy clauses_ or pCodeObject_. Caller is responsible // for proper deallocation of memory. @@ -211,7 +209,6 @@ void ex_expr::makeLeanCopyAll(Space * space) // make a 'lean' copy of 'this' to 'other'. // Do not copy clauses_ or pCodeObject_. -// LCOV_EXCL_START void ex_expr::makeLeanCopy(ex_expr_lean * other, Space * space) { // *((ex_expr_base*)other) = *((ex_expr_base*)this); @@ -246,7 +243,6 @@ void ex_expr::makeLeanCopy(ex_expr_lean * other, Space * space) other->persistentArea_ = space->allocateAlignedSpace(persistentLength_); } } -// LCOV_EXCL_STOP void ex_expr::displayContents(Space * space, short mode, const char * displayStr,ULng32 flag) { char buf[100] = {0}; // Soln 10-041117-1848 @@ -316,14 +312,12 @@ void ex_expr::displayContents(Space * space, short mode, const char * displayStr if(getPCodeObject()) { - // LCOV_EXCL_START str_sprintf(buf, " PCode:\n"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "PCode Expr Length: %d", getPCodeSize()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); PCode::displayContents(getPCodeObject()->getPCIList(), space); - // LCOV_EXCL_STOP } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_function.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp index 782131e..64f2c3b 100644 --- a/core/sql/exp/exp_function.cpp +++ b/core/sql/exp/exp_function.cpp @@ -1080,7 +1080,6 @@ ex_expr::exp_return_type ExFunctionReplace::eval(char *op_data[], if (CollationInfo::isSystemCollation(getCollation())) { - // LCOV_EXCL_START nPasses= CollationInfo::getCollationNPasses(getCollation()); lenSourceStr = getArgEncodedLen(0); lenSearchStr = getArgEncodedLen(1); @@ -1110,7 +1109,6 @@ ex_expr::exp_return_type ExFunctionReplace::eval(char *op_data[], nPasses, getCollation(), TRUE); - // LCOV_EXCL_START } @@ -1404,7 +1402,6 @@ ex_expr::exp_return_type ex_function_trim_char::eval(char *op_data[], // case of collation -- if (CollationInfo::isSystemCollation(getCollation())) { - // LCOV_EXCL_START nPasses = CollationInfo::getCollationNPasses(getCollation()); //get the length of the encoded source string @@ -1455,7 +1452,6 @@ ex_expr::exp_return_type ex_function_trim_char::eval(char *op_data[], getCollation(), FALSE); - // LCOV_EXCL_STOP } // Find how many leading characters in operand 2 correspond to the trim // character. @@ -2179,14 +2175,11 @@ Lng32 ex_function_position::findPosition // sourceStr. if (searchLen <= 0) - // LCOV_EXCL_START return 0; - // LCOV_EXCL_STOP Int32 position = 1; Int32 collPosition = 1; Int32 char_count = 1; Int32 number_bytes; - // LCOV_EXCL_START while (position + searchLen -1 <= sourceLen) { if (str_cmp(searchStr, &sourceStr[position-1], (Int32)searchLen) != 0) @@ -2222,7 +2215,6 @@ Lng32 ex_function_position::findPosition } } return 0; - // LCOV_EXCL_STOP } @@ -2345,7 +2337,6 @@ ex_expr::exp_return_type ex_function_position_doublebyte::eval(char *op_data[], return ex_expr::EXPR_OK; }; -// LCOV_EXCL_START static Lng32 findTokenPosition(char * sourceStr, Lng32 sourceLen, char * searchStr, Lng32 searchLen, short bytesPerChar) @@ -2550,7 +2541,6 @@ ex_expr::exp_return_type ExFunctionReverseStr::eval(char *op_data[], return ex_expr::EXPR_OK; }; -// LCOV_EXCL_STOP ex_expr::exp_return_type ex_function_current::eval(char *op_data[], CollHeap*, ComDiagsArea**) @@ -3627,7 +3617,6 @@ void ex_function_encode::encodeKeyValue(Attributes * attr, break; } - // LCOV_EXCL_START case REC_BYTE_F_ASCII: { if (CollationInfo::isSystemCollation(collation )) { @@ -3645,7 +3634,6 @@ void ex_function_encode::encodeKeyValue(Attributes * attr, collation, TRUE); } - // LCOV_EXCL_STOP else //search { Int32 effEncodedKeyLength = 0; @@ -3690,7 +3678,6 @@ void ex_function_encode::encodeKeyValue(Attributes * attr, if (CollationInfo::isSystemCollation(collation)) { - // LCOV_EXCL_START Int16 nPasses = CollationInfo::getCollationNPasses(collation); NABoolean rmTspaces = getRmTSpaces(collation); @@ -3724,7 +3711,6 @@ void ex_function_encode::encodeKeyValue(Attributes * attr, } } else - // LCOV_EXCL_STOP { // @@ -3821,7 +3807,6 @@ void ex_function_encode::encodeKeyValue(Attributes * attr, // class ex_function_encode //////////////////////////////////////////////////////////////////// ex_function_encode::ex_function_encode(){}; -// LCOV_EXCL_START ex_function_encode::ex_function_encode(OperatorTypeEnum oper_type, Attributes ** attr, Space * space, @@ -3837,7 +3822,6 @@ ex_function_encode::ex_function_encode(OperatorTypeEnum oper_type, setCollEncodingType(CollationInfo::Sort); }; -// LCOV_EXCL_STOP ex_function_encode::ex_function_encode(OperatorTypeEnum oper_type, Attributes ** attr, Space * space, @@ -4040,7 +4024,6 @@ void ex_function_encode::getCollationWeight( } } } -// LCOV_EXCL_START unsigned char ex_function_encode::getCollationWeight( CharInfo::Collation collation, Int16 pass, @@ -4284,7 +4267,6 @@ void ex_function_encode::encodeCollationSearchKey(const UInt8 * src, str_pad( (char *) ptr,(encodeKey - ptr) + encodedKeyLength, '\0'); } // ex_function_encode::encodeCollationSearchKey -// LCOV_EXCL_STOP //////////////////////////////////////////////////////////////////////// // class ex_function_explode_varchar @@ -5054,7 +5036,6 @@ ex_expr::exp_return_type ex_function_mod::eval(char *op_data[], //////////////////////////////////////////////////////////////////// // class ex_function_mask //////////////////////////////////////////////////////////////////// -// LCOV_EXCL_START ex_expr::exp_return_type ex_function_mask::eval(char *op_data[], CollHeap* heap, ComDiagsArea** diagsArea) @@ -5181,7 +5162,6 @@ ex_expr::exp_return_type ExFunctionShift::eval(char *op_data[], return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP static ex_expr::exp_return_type getDoubleValue(double *dest, char *source, @@ -5401,7 +5381,6 @@ ex_expr::exp_return_type ExpRaiseErrorFunction::eval(char *op_data[], // ----------------------------------------------------------------------- // methods for ExFunctionPack // ----------------------------------------------------------------------- -// LCOV_EXCL_START // Constructor. ExFunctionPack::ExFunctionPack(Attributes** attr, Space* space, @@ -5865,7 +5844,6 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea) return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP ex_expr::exp_return_type ex_function_translate::eval(char *op_data[], CollHeap* heap, ComDiagsArea** diagsArea) @@ -6109,7 +6087,6 @@ ex_expr::exp_return_type ExProgDistrib::eval(char *op_data[], *((ULng32 *)op_data[0]) = resultValue - 1; return ex_expr::EXPR_OK; } -// LCOV_EXCL_START ex_expr::exp_return_type ExProgDistribKey::eval(char *op_data[], CollHeap*, ComDiagsArea**) @@ -6145,7 +6122,6 @@ ex_expr::exp_return_type ExProgDistribKey::eval(char *op_data[], return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP ex_expr::exp_return_type ExPAGroup::eval(char *op_data[], CollHeap*, ComDiagsArea**) @@ -6469,7 +6445,6 @@ ExRowsetArrayInto::eval(char *op_data[], CollHeap *heap, return ex_expr::EXPR_OK; } -// LCOV_EXCL_START ex_expr::exp_return_type ex_function_nullifzero::eval(char *op_data[], CollHeap *heap, ComDiagsArea** diagsArea) @@ -6504,7 +6479,6 @@ ex_expr::exp_return_type ex_function_nullifzero::eval(char *op_data[], return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP // // NVL(e1, e2) returns e2 if e1 is NULL otherwise e1. NVL(e1, e2) is // equivalent to ANSI/ISO @@ -8632,5 +8606,4 @@ aes_decrypt_error: return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP #pragma warn(1506) // warning elimination http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_like.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_like.cpp b/core/sql/exp/exp_like.cpp index 1ebd588..e08aa53 100644 --- a/core/sql/exp/exp_like.cpp +++ b/core/sql/exp/exp_like.cpp @@ -129,7 +129,7 @@ LikePattern::LikePattern patternBuf += lastHeader->getLength(); if(systemCollationFlag) - {// LCOV_EXCL_START + { headerLength = lastHeader->getLength(); if(headerLength >0) { @@ -152,7 +152,6 @@ LikePattern::LikePattern lastHeader->setEncodedHeader(headerPattern); } lastHeader->setCollation(co); - // LCOV_EXCL_STOP } lastHeader->append(new(exHeap)LikePatternHeader(i, patternBuf, exHeap)); prevHeader = lastHeader; @@ -172,7 +171,7 @@ LikePattern::LikePattern lastHeader->endClauses(); if(systemCollationFlag) - {// LCOV_EXCL_START + { headerLength = lastHeader->getLength(); if(headerLength > 0) { @@ -194,7 +193,6 @@ LikePattern::LikePattern lastHeader->setEncodedHeader(headerPattern); } lastHeader->setCollation(co); - // LCOV_EXCL_STOP } // // If there are more than two headers in the chain, move the last header to @@ -263,9 +261,7 @@ NABoolean LikePattern::matches UInt16 nPasses; if (systemCollationFlag) - // LCOV_EXCL_START nPasses = CollationInfo::getCollationNPasses(co); - // LCOV_EXCL_STOP else nPasses = 1; @@ -277,11 +273,9 @@ NABoolean LikePattern::matches { if (systemCollationFlag) { - // LCOV_EXCL_START headerPattern = header->getEncodedPattern(); if ((header->getLength()*nPasses) > (endOfText - text)) return FALSE; - // LCOV_EXCL_STOP } else { @@ -341,11 +335,10 @@ NABoolean LikePattern::matches { headerLength = header->getLength(); if (systemCollationFlag) - {// LCOV_EXCL_START + { headerPattern = header->getEncodedPattern(); if (header->getLength() > (endOfText - text)) return FALSE; - // LCOV_EXCL_STOP } else { @@ -378,9 +371,7 @@ NABoolean LikePattern::matches if(systemCollationFlag) { - // LCOV_EXCL_START text += nPasses; - // LCOV_EXCL_STOP } else { @@ -402,7 +393,6 @@ NABoolean LikePattern::matches { if(systemCollationFlag) { - // LCOV_EXCL_START equalFlag = TRUE; for(short i = 0; i < nPasses; i++) @@ -416,7 +406,6 @@ NABoolean LikePattern::matches if(equalFlag) break; else text += nPasses; - // LCOV_EXCL_STOP } else { @@ -628,7 +617,6 @@ ex_expr::exp_return_type ex_like_clause_char::eval(char *op_data[], if (systemCollationFlag) { - // LCOV_EXCL_START pattern.setCollation (co); short nPasses = CollationInfo::getCollationNPasses(co); Int32 effEncodedKeyLength; @@ -658,7 +646,6 @@ ex_expr::exp_return_type ex_like_clause_char::eval(char *op_data[], textStr = encodedText; // len1 = effEncodedKeyLength; the length without trading space. len1 *= nPasses; - // LCOV_EXCL_STOP } if (cs == CharInfo::UTF8) @@ -787,19 +774,15 @@ NABoolean LikePatternHeader::matches(const char* text, if (systemCollationFlag) { - // LCOV_EXCL_START nPasses = CollationInfo::getCollationNPasses(co); encodedPattern = getEncodedPattern(); - // LCOV_EXCL_STOP } do { if (systemCollationFlag) { - // LCOV_EXCL_START clause->setEncodedPattern(encodedPattern); clause->setCollation(this->getCollation()); - // LCOV_EXCL_STOP } if (NOT clause->matches(text)) return FALSE; @@ -810,12 +793,10 @@ NABoolean LikePatternHeader::matches(const char* text, if (systemCollationFlag) { - // LCOV_EXCL_START Int32 len = clause->getLength()*nPasses; text += len; encodedPattern += len; headerMatchLen += len; - // LCOV_EXCL_STOP } else { @@ -838,12 +819,10 @@ NABoolean LikePatternHeader::matches(const char* text, { if (systemCollationFlag) { - // LCOV_EXCL_START Int32 len = clauseLen*nPasses; text += len; encodedPattern += len; headerMatchLen += len; - // LCOV_EXCL_STOP } else { @@ -885,11 +864,9 @@ NABoolean LikePatternHeader::matchesR(const char * text, if (systemCollationFlag) { - // LCOV_EXCL_START headerPattern = getEncodedPattern(); nPasses = CollationInfo::getCollationNPasses(co); headerLength *= nPasses; - // LCOV_EXCL_STOP } else { @@ -919,7 +896,6 @@ NABoolean LikePatternHeader::matchesR(const char * text, Int32 numOfUnderscore = clauseR->getLength(); if(systemCollationFlag) { - // LCOV_EXCL_START endText -= (numOfUnderscore * nPasses); headerLength -= (clauseR->getLength() * nPasses); if(endText < text) // String left is shorter than the pattern @@ -928,7 +904,6 @@ NABoolean LikePatternHeader::matchesR(const char * text, NADELETEBASIC(charLengthInBuf, heap); return FALSE; } - // LCOV_EXCL_STOP } else { @@ -955,7 +930,6 @@ NABoolean LikePatternHeader::matchesR(const char * text, // p1 point to the beginning of each character if(systemCollationFlag) { - // LCOV_EXCL_START if(p < p1) // String left is shorter than the pattern { if(deallocateNeeded) @@ -968,7 +942,6 @@ NABoolean LikePatternHeader::matchesR(const char * text, clauseR->setEncodedPattern (getEncodedPattern()+(headerLength - (clauseR->getLength()*nPasses))); } - // LCOV_EXCL_STOP } else { @@ -1015,11 +988,9 @@ NABoolean LikePatternClause::matches(const char* text) if (CollationInfo::isSystemCollation(co)) { - // LCOV_EXCL_START pattern = encodedPattern_; nPasses = CollationInfo::getCollationNPasses(co); clauseLength *= nPasses; - // LCOV_EXCL_STOP } else pattern = (unsigned char *)pattern_; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_math_func.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_math_func.cpp b/core/sql/exp/exp_math_func.cpp index 3ef09ca..b182bf8 100644 --- a/core/sql/exp/exp_math_func.cpp +++ b/core/sql/exp/exp_math_func.cpp @@ -128,7 +128,6 @@ ex_expr::exp_return_type ex_function_abs::eval(char *op_data[], ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); retcode = ex_expr::EXPR_ERROR; break; - // LCOV_EXCL_STOP } return retcode; @@ -136,7 +135,6 @@ ex_expr::exp_return_type ex_function_abs::eval(char *op_data[], ; #define PIVALUE 3.1415926E0; -// LCOV_EXCL_START ex_expr::exp_return_type ExFunctionMath::evalUnsupportedOperations( char *op_data[], CollHeap *heap, @@ -145,7 +143,6 @@ ex_expr::exp_return_type ExFunctionMath::evalUnsupportedOperations( ExRaiseSqlError(heap, diagsArea, EXE_INTERNAL_ERROR); return ex_expr::EXPR_ERROR; } -// LCOV_EXCL_STOP ex_expr::exp_return_type ExFunctionMath::eval(char *op_data[], CollHeap *heap, ComDiagsArea** diagsArea) @@ -201,11 +198,9 @@ ex_expr::exp_return_type ExFunctionMath::eval(char *op_data[], op = *((double*)op_data[1]); break; default: - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_BAD_ARG_TO_MATH_FUNC); **diagsArea << DgString0("ROUND"); return ex_expr::EXPR_ERROR; - // LCOV_EXCL_STOP } // @@ -261,7 +256,6 @@ ex_expr::exp_return_type ExFunctionMath::eval(char *op_data[], case ITM_SCALE_TRUNC: { - // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_MATH_FUNC_NOT_SUPPORTED); if (getOperType() == ITM_ROUND) **diagsArea << DgString0("ROUND"); @@ -271,7 +265,6 @@ ex_expr::exp_return_type ExFunctionMath::eval(char *op_data[], retcode = ex_expr::EXPR_ERROR; } break; - // LCOV_EXCL_STOP case ITM_ACOS: if ((*(double *)op_data[1] < -1) || @@ -669,7 +662,6 @@ ex_expr::exp_return_type ExFunctionBitOper::eval(char *op_data[], { case ITM_BITAND: { - // LCOV_EXCL_START if (getOperand(0)->getDatatype() == REC_BIN32_UNSIGNED) *(UInt32 *)op_data[0] = *(UInt32 *)op_data[1] & *(UInt32 *)op_data[2]; @@ -728,7 +720,6 @@ ex_expr::exp_return_type ExFunctionBitOper::eval(char *op_data[], } } break; - // LCOV_EXCL_STOP case ITM_BITEXTRACT: { UInt32 startBit = *(UInt32 *)op_data[2]; @@ -774,7 +765,6 @@ ex_expr::exp_return_type ExFunctionBitOper::eval(char *op_data[], case REC_IEEE_FLOAT32: { UInt32 temp; - // LCOV_EXCL_START temp = *(UInt32*)op_data[1] << startBit; temp = temp >> (32 - numBits); result = temp; @@ -798,7 +788,6 @@ ex_expr::exp_return_type ExFunctionBitOper::eval(char *op_data[], **diagsArea << DgString0("BITEXTRACT"); return ex_expr::EXPR_ERROR; } - // LCOV_EXCL_STOP break; } // switch http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/exp/exp_misc.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_misc.cpp b/core/sql/exp/exp_misc.cpp index 67d0909..58f2412 100644 --- a/core/sql/exp/exp_misc.cpp +++ b/core/sql/exp/exp_misc.cpp @@ -39,11 +39,9 @@ #include "exp_stdh.h" #include "exp_clause_derived.h" -// LCOV_EXCL_START ex_expr::exp_return_type ex_noop_clause::eval(char * /*op_data*/[], CollHeap*, ComDiagsArea**) { return ex_expr::EXPR_OK; } -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/export/ComDiags.cpp ---------------------------------------------------------------------- diff --git a/core/sql/export/ComDiags.cpp b/core/sql/export/ComDiags.cpp index f99bacd..65595c4 100644 --- a/core/sql/export/ComDiags.cpp +++ b/core/sql/export/ComDiags.cpp @@ -1408,7 +1408,6 @@ void ComCondition::setSQLCODE (Lng32 newSQLCODE) } } -// LCOV_EXCL_START // This code has been unit tested and most is also tested by // executor/TEST082 if ((theError == CLI_TCB_EXECUTE_ERROR) || // 8816 http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/generator/GenPreCode.cpp ---------------------------------------------------------------------- diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp index 95fff08..f94cb13 100644 --- a/core/sql/generator/GenPreCode.cpp +++ b/core/sql/generator/GenPreCode.cpp @@ -8355,7 +8355,6 @@ ItemExpr * BiRelat::preCodeGen(Generator * generator) CMPASSERT(coll1==coll2); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll1)) { setCollationEncodeComp(TRUE); @@ -8460,7 +8459,6 @@ ItemExpr * BiRelat::preCodeGen(Generator * generator) } } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { // update both operands if case insensitive comparions @@ -9446,14 +9444,12 @@ ItemExpr * Hash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { child(0) = new(generator->wHeap()) CompEncode(child(0),FALSE, -1, CollationInfo::Compare); child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { //-------------------------- @@ -9480,7 +9476,6 @@ ItemExpr * Hash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { hi = new(generator->wHeap()) @@ -9488,7 +9483,6 @@ ItemExpr * Hash::preCodeGen(Generator * generator) hi = hi->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { //----------------------------- @@ -9515,7 +9509,6 @@ ItemExpr * Hash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { child(0) = new (generator->wHeap()) @@ -9523,7 +9516,6 @@ ItemExpr * Hash::preCodeGen(Generator * generator) child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { if ((chType.isCaseinsensitive()) && @@ -9578,14 +9570,12 @@ ItemExpr * HiveHash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { child(0) = new(generator->wHeap()) CompEncode(child(0),FALSE, -1, CollationInfo::Compare); child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { //-------------------------- @@ -9612,7 +9602,6 @@ ItemExpr * HiveHash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { hi = new(generator->wHeap()) @@ -9620,7 +9609,6 @@ ItemExpr * HiveHash::preCodeGen(Generator * generator) hi = hi->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { //----------------------------- @@ -9647,7 +9635,6 @@ ItemExpr * HiveHash::preCodeGen(Generator * generator) const CharType &chType = (CharType&)childType; CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { child(0) = new (generator->wHeap()) @@ -9655,7 +9642,6 @@ ItemExpr * HiveHash::preCodeGen(Generator * generator) child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { if ((chType.isCaseinsensitive()) && @@ -9717,7 +9703,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { if (child(0)->getOperatorType() == ITM_NARROW) @@ -9738,7 +9723,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { if ((chType.isCaseinsensitive()) && @@ -9764,7 +9748,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { //Solution 10-081216-8006 @@ -9786,7 +9769,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) hi = hi->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { if ((chType.isCaseinsensitive()) && @@ -9813,7 +9795,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) CharInfo::Collation coll = chType.getCollation(); -//LCOV_EXCL_START : cnu - Should not count in Code Coverage until we support non-binary collation in SQ if (CollationInfo::isSystemCollation(coll)) { //Solution 10-081216-8006 @@ -9835,7 +9816,6 @@ ItemExpr * HashDistPartHash::preCodeGen(Generator * generator) child(0) = child(0)->bindNode(generator->getBindWA()); } -//LCOV_EXCL_STOP : cnu - Should not count in Code Coverage until we support non-binary collation in SQ else { if ((chType.isCaseinsensitive()) && http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/generator/vers_libgenerator.cpp ---------------------------------------------------------------------- diff --git a/core/sql/generator/vers_libgenerator.cpp b/core/sql/generator/vers_libgenerator.cpp index 6128e9b..e4bce18 100644 --- a/core/sql/generator/vers_libgenerator.cpp +++ b/core/sql/generator/vers_libgenerator.cpp @@ -26,6 +26,4 @@ #define VERS_CV_MIN 0 #define VERS_CV_UPD 1 -// LCOV_EXCL_START VERS_LIB(libgenerator) -// LCOV_EXCL_STOP http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7a95e1da/core/sql/langman/LmAssert.cpp ---------------------------------------------------------------------- diff --git a/core/sql/langman/LmAssert.cpp b/core/sql/langman/LmAssert.cpp index 94e6553..3d8b441 100644 --- a/core/sql/langman/LmAssert.cpp +++ b/core/sql/langman/LmAssert.cpp @@ -41,7 +41,6 @@ // Exclude this function from coverage as it is called only when there is an assertion in LM // which results in UDR server abend, so no coverage info can be generated. -// LCOV_EXCL_START void lmAssert(const char *file, Int32 linenum, const char *msg) { if (!file) @@ -59,7 +58,6 @@ void lmAssert(const char *file, Int32 linenum, const char *msg) lmMakeTFDSCall(message, file, linenum); // should not reach here } -// LCOV_EXCL_STOP
