8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00

Backport fix for CORE-2888 - A memory corruption cause incorrect query evaluation and may crash the server

This commit is contained in:
asfernandes 2010-02-28 14:42:04 +00:00
parent ffd793d9ce
commit eb705dbc6e

View File

@ -7053,8 +7053,13 @@ static dsql_nod* pass1_make_derived_field(CompiledStatement* statement, thread_d
// Try to generate derived field from sub-select
dsql_nod* derived_field = pass1_make_derived_field(statement, tdbb,
select_item->nod_arg[e_via_value_1]);
derived_field->nod_arg[e_derived_field_value] = select_item;
return derived_field;
if (derived_field->nod_type == nod_derived_field)
{
derived_field->nod_arg[e_derived_field_value] = select_item;
return derived_field;
}
return select_item;
}
default: