Repository: incubator-hawq
Updated Branches:
  refs/heads/master ca7f7b136 -> 189a2c3a0 (forced update)


HAWQ-1000. 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/189a2c3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/189a2c3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/189a2c3a

Branch: refs/heads/master
Commit: 189a2c3a0f411c45e606ac7ff109c8febdc6d2cc
Parents: f149c08
Author: Ming LI <[email protected]>
Authored: Mon Jul 25 13:56:55 2016 +0800
Committer: Ming LI <[email protected]>
Committed: Fri Aug 12 11:57:13 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/189a2c3a/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/189a2c3a/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;
     }
 
 

Reply via email to