mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
Removed "cast no-op" extensions as they break many tests, e.g. CAST('A' as CHAR(10)) remains CHAR(1) instead of being padded up to CHAR(10). Let's no-op only really equal descriptors for the time being.
This commit is contained in:
parent
b1efab55b2
commit
2461d05460
@ -2729,25 +2729,7 @@ ValueExprNode* CastNode::pass2(thread_db* tdbb, CompilerScratch* csb)
|
||||
dsc sourceDesc;
|
||||
source->getDesc(tdbb, csb, &sourceDesc);
|
||||
|
||||
// Let's check if the cast is required.
|
||||
|
||||
if (desc.dsc_dtype == dtype_text)
|
||||
{
|
||||
desc.dsc_dtype = dtype_varying;
|
||||
desc.dsc_length += sizeof(USHORT);
|
||||
}
|
||||
|
||||
if (sourceDesc.dsc_dtype == dtype_text)
|
||||
{
|
||||
sourceDesc.dsc_dtype = dtype_varying;
|
||||
sourceDesc.dsc_length += sizeof(USHORT);
|
||||
}
|
||||
|
||||
if (desc.dsc_dtype == dtype_varying && sourceDesc.dsc_dtype == dtype_varying &&
|
||||
desc.dsc_length > sourceDesc.dsc_length)
|
||||
{
|
||||
desc.dsc_length = sourceDesc.dsc_length;
|
||||
}
|
||||
// Let's check if the cast is required
|
||||
|
||||
dummyCast = !itemInfo && DSC_EQUIV(&sourceDesc, &desc, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user