8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00
This commit is contained in:
asfernandes 2006-05-16 19:09:18 +00:00
parent ad14b25fb2
commit b4c5f0ef21

View File

@ -1820,33 +1820,31 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
}
case nod_trim:
CMP_get_desc(tdbb, csb, node->nod_arg[e_trim_value], desc);
if (node->nod_arg[e_trim_characters])
{
CMP_get_desc(tdbb, csb, node->nod_arg[e_trim_value], desc);
if (node->nod_arg[e_trim_characters])
{
DSC desc1;
CMP_get_desc(tdbb, csb, node->nod_arg[e_trim_characters], &desc1);
desc->dsc_flags |= desc1.dsc_flags & DSC_null;
}
if (desc->dsc_dtype != dtype_blob)
{
USHORT length = DSC_string_length(desc);
if (!DTYPE_IS_TEXT(desc->dsc_dtype))
{
desc->dsc_ttype() = ttype_ascii;
desc->dsc_scale = 0;
}
desc->dsc_dtype = dtype_varying;
desc->dsc_length = length + sizeof(USHORT);
}
return;
DSC desc1;
CMP_get_desc(tdbb, csb, node->nod_arg[e_trim_characters], &desc1);
desc->dsc_flags |= desc1.dsc_flags & DSC_null;
}
if (desc->dsc_dtype != dtype_blob)
{
USHORT length = DSC_string_length(desc);
if (!DTYPE_IS_TEXT(desc->dsc_dtype))
{
desc->dsc_ttype() = ttype_ascii;
desc->dsc_scale = 0;
}
desc->dsc_dtype = dtype_varying;
desc->dsc_length = length + sizeof(USHORT);
}
return;
case nod_function:
{
const UserFunction* function = (UserFunction*) node->nod_arg[e_fun_function];