mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:03:03 +01:00
This commit is contained in:
parent
f8ed006057
commit
fc2fe39d3a
@ -13545,6 +13545,7 @@ ValueExprNode* ValueIfNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
|
||||
doDsqlPass(dsqlScratch, condition),
|
||||
doDsqlPass(dsqlScratch, trueValue),
|
||||
doDsqlPass(dsqlScratch, falseValue));
|
||||
node->dsqlGenCast = dsqlGenCast;
|
||||
|
||||
PASS1_set_parameter_type(dsqlScratch, node->trueValue, node->falseValue, false);
|
||||
PASS1_set_parameter_type(dsqlScratch, node->falseValue, node->trueValue, false);
|
||||
@ -13568,8 +13569,12 @@ void ValueIfNode::genBlr(DsqlCompilerScratch* dsqlScratch)
|
||||
{
|
||||
dsc desc;
|
||||
make(dsqlScratch, &desc);
|
||||
dsqlScratch->appendUChar(blr_cast);
|
||||
GEN_descriptor(dsqlScratch, &desc, true);
|
||||
|
||||
if (dsqlGenCast)
|
||||
{
|
||||
dsqlScratch->appendUChar(blr_cast);
|
||||
GEN_descriptor(dsqlScratch, &desc, true);
|
||||
}
|
||||
|
||||
dsqlScratch->appendUChar(blr_value_if);
|
||||
GEN_expr(dsqlScratch, condition);
|
||||
|
@ -2220,6 +2220,7 @@ public:
|
||||
NestConst<BoolExprNode> condition;
|
||||
NestConst<ValueExprNode> trueValue;
|
||||
NestConst<ValueExprNode> falseValue;
|
||||
bool dsqlGenCast = true;
|
||||
};
|
||||
|
||||
|
||||
|
@ -8712,6 +8712,8 @@ searched_when_clause
|
||||
| searched_when_clause WHEN search_condition THEN case_result
|
||||
{
|
||||
ValueIfNode* cond = newNode<ValueIfNode>($3, $5, NullNode::instance());
|
||||
cond->dsqlGenCast = false;
|
||||
|
||||
ValueIfNode* last = $1;
|
||||
ValueIfNode* next;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user