You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by ml...@apache.org on 2016/08/12 02:47:01 UTC

incubator-hawq git commit: GPSQL-3288: Set dummy workfile pointer to NULL after calling ExecWorkFile_Close()

Repository: incubator-hawq
Updated Branches:
  refs/heads/master f149c0842 -> ae9bcb992


GPSQL-3288: Set dummy workfile pointer to NULL after calling ExecWorkFile_Close()


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

Branch: refs/heads/master
Commit: ae9bcb9928fb2b5a1bcb014d1810e9d654614e69
Parents: f149c08
Author: Ming LI <ml...@pivotal.io>
Authored: Mon Jul 25 13:56:55 2016 +0800
Committer: Ming LI <ml...@pivotal.io>
Committed: Fri Aug 12 10:14:07 2016 +0800

----------------------------------------------------------------------
 src/backend/utils/sort/tuplesort.c    | 2 ++
 src/backend/utils/sort/tuplesort_mk.c | 1 +
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ae9bcb99/src/backend/utils/sort/tuplesort.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 761fb80..7270f61 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -915,11 +915,13 @@ tuplesort_end(Tuplesortstate *state)
 	if (state->tapeset)
 	{
 		LogicalTapeSetClose(state->tapeset, NULL /* workset */);
+		state->tapeset = NULL;
 
 		if (state->pfile_rwfile_state)
         {
 			workfile_mgr_close_file(NULL /* workset */, state->pfile_rwfile_state, true);
         }
+		state->pfile_rwfile_state = NULL;
 	}
 
 	tuplesort_finalize_stats(state);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ae9bcb99/src/backend/utils/sort/tuplesort_mk.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/sort/tuplesort_mk.c b/src/backend/utils/sort/tuplesort_mk.c
index 670f97b..e26c04f 100644
--- a/src/backend/utils/sort/tuplesort_mk.c
+++ b/src/backend/utils/sort/tuplesort_mk.c
@@ -984,6 +984,7 @@ tuplesort_end_mk(Tuplesortstate_mk *state)
         {
         	workfile_mgr_close_file(state->work_set, state->tapeset_state_file, true);
         }
+        state->tapeset_state_file = NULL;
     }