Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/dsql/DdlNodes.epp
Original file line number Diff line number Diff line change
Expand Up @@ -6480,11 +6480,10 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch
storeGlobalField(tdbb, transaction, fieldDefinition.fieldSource, field,
computedSource, computedValue);
}
else
else if (field->collate.hasData())
{
// Resolve possible additional collation for domains. For plain types it is already resolved above.
if (field->collate.hasData())
DDL_resolve_intl_type(dsqlScratch, field, field->collate);
DDL_resolve_intl_type(dsqlScratch, field, field->collate);
}

if ((relation->rel_flags & REL_external) &&
Expand Down Expand Up @@ -6541,7 +6540,8 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch
}

fieldDefinition.defaultValue = defaultValue;
fieldDefinition.collationId = field->collationId;
if (field->typeOfName.isEmpty() || field->collate.hasData())
fieldDefinition.collationId = field->collationId;
fieldDefinition.store(tdbb, transaction);

// Define the field constraints.
Expand Down
8 changes: 1 addition & 7 deletions src/dsql/parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -4281,13 +4281,7 @@ alter_domain_op($alterDomainNode)
| TO symbol_column_name
{ setClause($alterDomainNode->renameTo, "DOMAIN NAME", *$2); }
| TYPE non_array_type
{
//// FIXME: ALTER DOMAIN doesn't support collations, and altered domain's
//// collation is always lost.
dsql_fld* type = $2;
type->collate = "";
setClause($alterDomainNode->type, "DOMAIN TYPE", type);
}
{ setClause($alterDomainNode->type, "DOMAIN TYPE", $2);}
;

%type alter_ops(<relationNode>)
Expand Down
Loading