Skip to content

Commit

Permalink
Fixed CORE-2822: Error "no current row for fetch operation" when subq…
Browse files Browse the repository at this point in the history
…uery includes a non-trivial derived table.
  • Loading branch information
dyemanov committed Jan 22, 2010
1 parent 4c4f0ae commit ccac0ea
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/jrd/Optimizer.cpp
Expand Up @@ -250,11 +250,9 @@ bool OPT_computable(CompilerScratch* csb, const jrd_nod* node, SSHORT stream,

for (ptr = rse->rse_relation, end = ptr + rse->rse_count; ptr < end && result; ptr++)
{
if ((*ptr)->nod_type != nod_rse)
if (!OPT_computable(csb, (*ptr), stream, idx_use, allowOnlyCurrentStream))
{
if (!OPT_computable(csb, (*ptr), stream, idx_use, allowOnlyCurrentStream)) {
result = false;
}
result = false;
}
}

Expand Down Expand Up @@ -1136,9 +1134,7 @@ void OptimizerRetrieval::findDependentFromStreams(const jrd_nod* node,
const jrd_nod* const* end;
for (ptr = rse->rse_relation, end = ptr + rse->rse_count; ptr < end; ptr++)
{
if ((*ptr)->nod_type != nod_rse) {
findDependentFromStreams(*ptr, streamList);
}
findDependentFromStreams(*ptr, streamList);
}

// Check value expression, if any
Expand Down

0 comments on commit ccac0ea

Please sign in to comment.