@@ -653,8 +653,9 @@ void ArithmeticNode::setParameterName(dsql_par* parameter) const
653653bool ArithmeticNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
654654 std::function<void (dsc*)> makeDesc, bool forceVarChar)
655655{
656- return PASS1_set_parameter_type (dsqlScratch, arg1, makeDesc, forceVarChar) |
657- PASS1_set_parameter_type (dsqlScratch, arg2, makeDesc, forceVarChar);
656+ const bool arg1Type = PASS1_set_parameter_type (dsqlScratch, arg1, makeDesc, forceVarChar);
657+ const bool arg2Type = PASS1_set_parameter_type (dsqlScratch, arg2, makeDesc, forceVarChar);
658+ return arg1Type || arg2Type;
658659}
659660
660661void ArithmeticNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -3273,8 +3274,10 @@ bool AtNode::setParameterType(DsqlCompilerScratch* dsqlScratch,
32733274 desc->setNullable (true );
32743275 };
32753276
3276- return PASS1_set_parameter_type (dsqlScratch, dateTimeArg, makeDesc, forceVarChar) |
3277- PASS1_set_parameter_type (dsqlScratch, zoneArg, makeZoneDesc, forceVarChar);
3277+ const bool dateTimeArgType = PASS1_set_parameter_type (dsqlScratch, dateTimeArg, makeDesc, forceVarChar);
3278+ const bool zoneArgType = PASS1_set_parameter_type (dsqlScratch, zoneArg, makeZoneDesc, forceVarChar);
3279+
3280+ return dateTimeArgType || zoneArgType;
32783281}
32793282
32803283void AtNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -4107,8 +4110,9 @@ void ConcatenateNode::setParameterName(dsql_par* parameter) const
41074110bool ConcatenateNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
41084111 std::function<void (dsc*)> makeDesc, bool forceVarChar)
41094112{
4110- return PASS1_set_parameter_type (dsqlScratch, arg1, makeDesc, forceVarChar) |
4111- PASS1_set_parameter_type (dsqlScratch, arg2, makeDesc, forceVarChar);
4113+ const bool arg1Type = PASS1_set_parameter_type (dsqlScratch, arg1, makeDesc, forceVarChar);
4114+ const bool arg2Type = PASS1_set_parameter_type (dsqlScratch, arg2, makeDesc, forceVarChar);
4115+ return arg1Type || arg2Type;
41124116}
41134117
41144118void ConcatenateNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -11893,9 +11897,10 @@ void SubstringNode::setParameterName(dsql_par* parameter) const
1189311897bool SubstringNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
1189411898 std::function<void (dsc*)> makeDesc, bool forceVarChar)
1189511899{
11896- return PASS1_set_parameter_type (dsqlScratch, expr, makeDesc, forceVarChar) |
11897- PASS1_set_parameter_type (dsqlScratch, start, makeDesc, forceVarChar) |
11898- PASS1_set_parameter_type (dsqlScratch, length, makeDesc, forceVarChar);
11900+ const bool exprType = PASS1_set_parameter_type (dsqlScratch, expr, makeDesc, forceVarChar);
11901+ const bool startType = PASS1_set_parameter_type (dsqlScratch, start, makeDesc, forceVarChar);
11902+ const bool lengthType = PASS1_set_parameter_type (dsqlScratch, length, makeDesc, forceVarChar);
11903+ return exprType || startType || lengthType;
1189911904}
1190011905
1190111906void SubstringNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -12217,9 +12222,10 @@ void SubstringSimilarNode::setParameterName(dsql_par* parameter) const
1221712222bool SubstringSimilarNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
1221812223 std::function<void (dsc*)> makeDesc, bool forceVarChar)
1221912224{
12220- return PASS1_set_parameter_type (dsqlScratch, expr, makeDesc, forceVarChar) |
12221- PASS1_set_parameter_type (dsqlScratch, pattern, makeDesc, forceVarChar) |
12222- PASS1_set_parameter_type (dsqlScratch, escape, makeDesc, forceVarChar);
12225+ const bool exprType = PASS1_set_parameter_type (dsqlScratch, expr, makeDesc, forceVarChar);
12226+ const bool patternType = PASS1_set_parameter_type (dsqlScratch, pattern, makeDesc, forceVarChar);
12227+ const bool escapeType = PASS1_set_parameter_type (dsqlScratch, escape, makeDesc, forceVarChar);
12228+ return exprType || patternType || escapeType;
1222312229}
1222412230
1222512231void SubstringSimilarNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -12745,8 +12751,9 @@ void TrimNode::setParameterName(dsql_par* parameter) const
1274512751bool TrimNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
1274612752 std::function<void (dsc*)> makeDesc, bool forceVarChar)
1274712753{
12748- return PASS1_set_parameter_type (dsqlScratch, value, makeDesc, forceVarChar) |
12749- PASS1_set_parameter_type (dsqlScratch, trimChars, makeDesc, forceVarChar);
12754+ const bool valueType = PASS1_set_parameter_type (dsqlScratch, value, makeDesc, forceVarChar);
12755+ const bool trimCharsType = PASS1_set_parameter_type (dsqlScratch, trimChars, makeDesc, forceVarChar);
12756+ return valueType || trimCharsType;
1275012757}
1275112758
1275212759void TrimNode::genBlr (DsqlCompilerScratch* dsqlScratch)
@@ -14118,8 +14125,9 @@ void ValueIfNode::setParameterName(dsql_par* parameter) const
1411814125bool ValueIfNode::setParameterType (DsqlCompilerScratch* dsqlScratch,
1411914126 std::function<void (dsc*)> makeDesc, bool forceVarChar)
1412014127{
14121- return PASS1_set_parameter_type (dsqlScratch, trueValue, makeDesc, forceVarChar) |
14122- PASS1_set_parameter_type (dsqlScratch, falseValue, makeDesc, forceVarChar);
14128+ const bool trueValueType = PASS1_set_parameter_type (dsqlScratch, trueValue, makeDesc, forceVarChar);
14129+ const bool falseValueType = PASS1_set_parameter_type (dsqlScratch, falseValue, makeDesc, forceVarChar);
14130+ return trueValueType || falseValueType;
1412314131}
1412414132
1412514133void ValueIfNode::genBlr (DsqlCompilerScratch* dsqlScratch)
0 commit comments