Skip to content

Commit

Permalink
Fixed CORE-2888 - A memory corruption cause incorrect query evaluatio…
Browse files Browse the repository at this point in the history
…n and may crash the server
  • Loading branch information
asfernandes committed Feb 26, 2010
1 parent 9b432cc commit 0829b12
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/dsql/pass1.cpp
Expand Up @@ -6239,13 +6239,19 @@ static dsql_nod* pass1_make_derived_field(DsqlCompilerScratch* dsqlScratch, thre
return select_item;
}

case nod_via :
case nod_via:
{
// Try to generate derived field from sub-select
dsql_nod* derived_field = pass1_make_derived_field(dsqlScratch, 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:
Expand Down

0 comments on commit 0829b12

Please sign in to comment.