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

Improvement CORE-2029 - Increase number of contexts avaiable when using derived tables

This commit is contained in:
asfernandes 2008-08-02 23:47:38 +00:00
parent c28f8807c0
commit fd90a1e25b
2 changed files with 7 additions and 1 deletions

View File

@ -523,6 +523,7 @@ public:
class dsql_ctx* req_outer_agg_context; //!< agg context for outer ref
ULONG req_base_offset; //!< place to go back and stuff in blr length
USHORT req_context_number; //!< Next available context number
USHORT req_derived_context_number; //!< Next available context number for derived tables
USHORT req_scope_level; //!< Scope level for parsing aliases in subqueries
//USHORT req_message_number; //!< Next available message number
USHORT req_loop_level; //!< Loop level

View File

@ -411,7 +411,12 @@ dsql_ctx* PASS1_make_context(CompiledStatement* statement, const dsql_nod* relat
context->ctx_relation = relation;
context->ctx_procedure = procedure;
context->ctx_request = statement;
if (relation_node->nod_type == nod_derived_table)
context->ctx_context = MAX_UCHAR + 1 + statement->req_derived_context_number++;
else
context->ctx_context = statement->req_context_number++;
context->ctx_scope_level = statement->req_scope_level;
// When we're in a outer-join part mark context for it.
if (statement->req_in_outer_join) {