From 0da0b0c2247dcb73fd3757d83c7d8576a080fa15 Mon Sep 17 00:00:00 2001 From: dimitr Date: Fri, 2 Jul 2010 10:43:33 +0000 Subject: [PATCH] Fixed CORE-3064: Using the procedure alias inside an explicit plan crashes the server. --- src/dsql/pass1.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dsql/pass1.cpp b/src/dsql/pass1.cpp index c3466e08eb..bb94feb513 100644 --- a/src/dsql/pass1.cpp +++ b/src/dsql/pass1.cpp @@ -5913,7 +5913,7 @@ static dsql_nod* pass1_alias_list(dsql_req* request, dsql_nod* alias_list) request->req_scope_level++; context = pass1_alias(request, context->ctx_childs_derived_table, (dsql_str*) *arg); } - else + else if (context->ctx_relation) { // This must be a VIEW dsql_nod** startArg = arg; @@ -5961,11 +5961,15 @@ static dsql_nod* pass1_alias_list(dsql_req* request, dsql_nod* alias_list) context = new_context; } - else + else { context = NULL; } } + else + { + context = NULL; + } } else {