mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:43:03 +01:00
Move the code to below thanks to Dmitry review.
This allow us to save a context number.
This commit is contained in:
parent
6c045e0661
commit
9eadb6c355
@ -8015,17 +8015,6 @@ static dsql_nod* pass1_rse_impl( DsqlCompilerScratch* dsqlScratch, dsql_nod* inp
|
||||
}
|
||||
|
||||
parent_context = FB_NEW(*tdbb->getDefaultPool()) dsql_ctx(*tdbb->getDefaultPool());
|
||||
|
||||
// Here we shouldn't have any window mapping.
|
||||
size_t mapCount = parent_context->ctx_maps.getCount();
|
||||
fb_assert(mapCount <= 1);
|
||||
|
||||
// If we have a map, copy it context number to ctx_context. If we haven't, generate it here.
|
||||
if (mapCount == 1)
|
||||
parent_context->ctx_context = parent_context->ctx_maps[0]->context;
|
||||
else
|
||||
parent_context->ctx_context = dsqlScratch->contextNumber++;
|
||||
|
||||
parent_context->ctx_scope_level = dsqlScratch->scopeLevel;
|
||||
|
||||
// When we're in a outer-join part mark context for it.
|
||||
@ -8214,6 +8203,17 @@ static dsql_nod* pass1_rse_impl( DsqlCompilerScratch* dsqlScratch, dsql_nod* inp
|
||||
#endif
|
||||
}
|
||||
rse = parent_rse;
|
||||
|
||||
// Here we shouldn't have any window mapping.
|
||||
size_t mapCount = parent_context->ctx_maps.getCount();
|
||||
fb_assert(mapCount <= 1);
|
||||
|
||||
// If we have a map, copy it context number to ctx_context. If we haven't, generate it here.
|
||||
// This is important for GEN/stuff_context.
|
||||
if (mapCount == 1)
|
||||
parent_context->ctx_context = parent_context->ctx_maps[0]->context;
|
||||
else
|
||||
parent_context->ctx_context = dsqlScratch->contextNumber++;
|
||||
}
|
||||
|
||||
bool sortWindow = rse->nod_arg[e_rse_sort] &&
|
||||
|
Loading…
Reference in New Issue
Block a user