From da7a3cc554f3e951fc4b20a6012e2ca03bd52e52 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Tue, 6 Aug 2019 12:25:33 -0300 Subject: [PATCH] Fixed CORE-6108 - Regression: FB3 throws "Datatypes are not comparable in expression" in procedure parameters. --- src/dsql/ExprNodes.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index 0e506d30b4..072a0b6b97 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -2922,7 +2922,10 @@ ValueExprNode* CoalesceNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) CoalesceNode* node = FB_NEW_POOL(getPool()) CoalesceNode(getPool(), doDsqlPass(dsqlScratch, args)); node->make(dsqlScratch, &node->nodDesc); // Set descriptor for output node. - node->setParameterType(dsqlScratch, &node->nodDesc, NULL, false); + + for (auto& item : node->args->items) + PASS1_set_parameter_type(dsqlScratch, item, &node->nodDesc, NULL, false); + return node; } @@ -2934,14 +2937,7 @@ void CoalesceNode::setParameterName(dsql_par* parameter) const bool CoalesceNode::setParameterType(DsqlCompilerScratch* dsqlScratch, const dsc* desc, ValueExprNode* node, bool /*forceVarChar*/) { - bool ret = false; - - for (NestConst* ptr = args->items.begin(); ptr != args->items.end(); ++ptr) - { - ret |= PASS1_set_parameter_type(dsqlScratch, *ptr, desc, node, false); - } - - return ret; + return false; } void CoalesceNode::genBlr(DsqlCompilerScratch* dsqlScratch)