8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:43:04 +01:00

Misc and fix per Claudio comments

This commit is contained in:
asfernandes 2010-02-16 21:16:21 +00:00
parent e83317a4ec
commit a6bd7851e8
3 changed files with 22 additions and 18 deletions

View File

@ -244,11 +244,6 @@ bool AggNode::dsqlFieldRemapper(FieldRemapper& visitor)
visitor.context, visitor.partitionNode, visitor.orderNode));
return false;
}
for (dsql_nod*** i = dsqlChildNodes.begin(); i != dsqlChildNodes.end(); ++i)
visitor.visit(*i);
return false;
}
for (dsql_nod*** i = dsqlChildNodes.begin(); i != dsqlChildNodes.end(); ++i)

View File

@ -481,6 +481,7 @@ bool OverNode::dsqlSubSelectFinder(SubSelectFinder& /*visitor*/)
bool OverNode::dsqlFieldRemapper(FieldRemapper& visitor)
{
// Save the values to restore them in the end.
AutoSetRestore<dsql_nod*> autoPartitionNode(&visitor.partitionNode, visitor.partitionNode);
AutoSetRestore<dsql_nod*> autoOrderNode(&visitor.orderNode, visitor.orderNode);

View File

@ -562,20 +562,28 @@ bool SlidingWindow::move(SINT64 delta)
return false;
}
impure_value* impure = partitionKeys.getBuffer(group->nod_count);
memset(impure, 0, sizeof(impure_value) * group->nod_count);
dsc* desc;
for (jrd_nod** ptr = group->nod_arg, **end = ptr + group->nod_count; ptr < end;
++ptr, ++impure)
try
{
jrd_nod* from = *ptr;
desc = EVL_expr(tdbb, from);
if (request->req_flags & req_null)
impure->vlu_desc.dsc_address = NULL;
else
EVL_make_value(tdbb, desc, impure);
impure_value* impure = partitionKeys.getBuffer(group->nod_count);
memset(impure, 0, sizeof(impure_value) * group->nod_count);
dsc* desc;
for (jrd_nod** ptr = group->nod_arg, **end = ptr + group->nod_count; ptr < end;
++ptr, ++impure)
{
jrd_nod* from = *ptr;
desc = EVL_expr(tdbb, from);
if (request->req_flags & req_null)
impure->vlu_desc.dsc_address = NULL;
else
EVL_make_value(tdbb, desc, impure);
}
}
catch (const Exception&)
{
stream->locate(tdbb, savedPosition); // Reposition for a new try.
throw;
}
moved = true;