mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Fix #7176 - Incorrect error "Invalid token. Malformed string." with union + blob + non utf8 varchar.
This commit is contained in:
parent
5d1ef75f34
commit
68ec92733c
@ -2761,16 +2761,11 @@ static void pass1_union_auto_cast(DsqlCompilerScratch* dsqlScratch, ExprNode* in
|
|||||||
field->length = desc.dsc_length;
|
field->length = desc.dsc_length;
|
||||||
field->flags = (desc.dsc_flags & DSC_nullable) ? FLD_nullable : 0;
|
field->flags = (desc.dsc_flags & DSC_nullable) ? FLD_nullable : 0;
|
||||||
|
|
||||||
if (desc.dsc_dtype <= dtype_any_text)
|
if (desc.isText() || desc.isBlob())
|
||||||
{
|
{
|
||||||
field->textType = desc.dsc_sub_type;
|
field->textType = desc.getTextType();
|
||||||
field->charSetId = INTL_GET_CHARSET(&desc);
|
field->charSetId = desc.getCharSet();
|
||||||
field->collationId = INTL_GET_COLLATE(&desc);
|
field->collationId = desc.getCollation();
|
||||||
}
|
|
||||||
else if (desc.dsc_dtype == dtype_blob)
|
|
||||||
{
|
|
||||||
field->charSetId = desc.dsc_scale;
|
|
||||||
field->collationId = desc.dsc_flags >> 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally copy the descriptors to the root nodes and swap
|
// Finally copy the descriptors to the root nodes and swap
|
||||||
|
Loading…
Reference in New Issue
Block a user