hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject incubator-hawq git commit: HAWQ-341. PL functions core dump due to query resource is not properly allocated for function/table function/sub-query
Date Thu, 14 Jan 2016 09:06:39 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 6345f8de1 -> 5ce139a25


HAWQ-341. PL functions core dump due to query resource is not properly allocated for function/table
function/sub-query


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/5ce139a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/5ce139a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/5ce139a2

Branch: refs/heads/master
Commit: 5ce139a259a37bfce15e87d094019bf1ed6d5dd4
Parents: 6345f8d
Author: Ruilong Huo <rhuo@pivotal.io>
Authored: Thu Jan 14 17:05:52 2016 +0800
Committer: Ruilong Huo <rhuo@pivotal.io>
Committed: Thu Jan 14 17:05:52 2016 +0800

----------------------------------------------------------------------
 src/backend/optimizer/plan/planner.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5ce139a2/src/backend/optimizer/plan/planner.c
----------------------------------------------------------------------
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 0ec7e5b..c6b2263 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -289,7 +289,7 @@ planner(Query *parse, int cursorOptions,
   ppResult->saResult = initResult;
   ppResult->stmt =NULL;
 	static int plannerLevel = 0;
-	static bool resourceNegotiateDone = false;
+	bool resourceNegotiateDone = false;
 	QueryResource *savedQueryResource = GetActiveQueryResource();;
 	SetActiveRelType(NIL);
 
@@ -329,7 +329,7 @@ planner(Query *parse, int cursorOptions,
 	  PG_END_TRY();
 	}
 	SetActiveRelType(NIL);
-	if (plannerLevel == 1)
+	if (plannerLevel >= 1)
 	{
 	  resourceNegotiateDone = true;
 	  gp_segments_for_planner = ppResult->saResult.planner_segments;
@@ -422,7 +422,6 @@ planner(Query *parse, int cursorOptions,
 	  /*
 	   * some cleanup work here.
 	   */
-	  resourceNegotiateDone = false;
 	  plannerLevel = 0;
   	  optimizer_segments = optimizer_segments_saved_value;
 	  if (savedQueryResource)
@@ -443,9 +442,8 @@ planner(Query *parse, int cursorOptions,
 	}
 	PG_END_TRY();
 
-	if (plannerLevel == 1)
+	if (plannerLevel >= 1)
 	{
-		resourceNegotiateDone = false;
 		if (savedQueryResource)
 		{
 			gp_segments_for_planner = list_length(savedQueryResource->segments);


Mime
View raw message