From 36ac140be8257293dd8399f104d6b002115ccc5d Mon Sep 17 00:00:00 2001 From: asfernandes Date: Mon, 1 Feb 2016 16:51:50 +0000 Subject: [PATCH] Fixed CORE-5093 - Alter computed field type does not work. --- src/dsql/DdlNodes.epp | 2 ++ src/dsql/parse.y | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index dab74d1b5e..39d6a4a136 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -7656,6 +7656,8 @@ void AlterRelationNode::modifyField(thread_db* tdbb, DsqlCompilerScratch* dsqlSc if (clause->computed) { + field->flags |= FLD_computed; + defineComputed(dsqlScratch, dsqlNode, field, clause->computed, computedSource, computedValue); } diff --git a/src/dsql/parse.y b/src/dsql/parse.y index 0d60d78dd3..0f2c570408 100644 --- a/src/dsql/parse.y +++ b/src/dsql/parse.y @@ -3730,7 +3730,7 @@ alter_op($relationNode) | col_opt symbol_column_name KW_TYPE non_array_type def_computed { RelationNode::AlterColTypeClause* clause = newNode(); - clause->field = newNode(); + clause->field = $4; clause->field->fld_name = *$2; clause->computed = $5; $relationNode->clauses.add(clause);