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

Fixed CORE-2822: Error "no current row for fetch operation" when subquery includes a non-trivial derived table.

This commit is contained in:
dimitr 2010-01-22 14:08:10 +00:00
parent 2422beafb0
commit 72430c3234

View File

@ -218,10 +218,8 @@ bool OPT_computable(CompilerScratch* csb, 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)) {
result = false;
}
if (!OPT_computable(csb, (*ptr), stream, idx_use, allowOnlyCurrentStream)) {
result = false;
}
}
@ -1127,9 +1125,7 @@ void OptimizerRetrieval::findDependentFromStreams(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