Skip to content

Commit 7fd38e5

Browse files
committed
Correction for COLLATE used together with the domain name
1 parent 5382899 commit 7fd38e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/dsql/DdlNodes.epp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6480,11 +6480,10 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch
64806480
storeGlobalField(tdbb, transaction, fieldDefinition.fieldSource, field,
64816481
computedSource, computedValue);
64826482
}
6483-
else
6483+
else if (field->collate.hasData())
64846484
{
64856485
// Resolve possible additional collation for domains. For plain types it is already resolved above.
6486-
if (field->collate.hasData())
6487-
DDL_resolve_intl_type(dsqlScratch, field, field->collate);
6486+
DDL_resolve_intl_type(dsqlScratch, field, field->collate);
64886487
}
64896488

64906489
if ((relation->rel_flags & REL_external) &&
@@ -6541,7 +6540,7 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch
65416540
}
65426541

65436542
fieldDefinition.defaultValue = defaultValue;
6544-
if (field->typeOfName.isEmpty())
6543+
if (field->typeOfName.isEmpty() || field->collate.hasData())
65456544
fieldDefinition.collationId = field->collationId;
65466545
fieldDefinition.store(tdbb, transaction);
65476546

0 commit comments

Comments
 (0)