You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/08/28 01:28:33 UTC

[incubator-doris] branch master updated: [Bug] Fix a null pointer bug in PlanFragmentExecutor. (#4473)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 004b955  [Bug] Fix a null pointer bug in PlanFragmentExecutor. (#4473)
004b955 is described below

commit 004b955ca44204658898b2229333623ce0b72606
Author: ZhangYu0123 <67...@users.noreply.github.com>
AuthorDate: Fri Aug 28 09:28:23 2020 +0800

    [Bug] Fix a null pointer bug in PlanFragmentExecutor. (#4473)
    
    Fix a null pointer bug in PlanFragmentExecutor. Add null check operation before it is used.
    Detail: #4472
---
 be/src/runtime/plan_fragment_executor.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/plan_fragment_executor.cpp b/be/src/runtime/plan_fragment_executor.cpp
index 6901f0c..97707f4 100644
--- a/be/src/runtime/plan_fragment_executor.cpp
+++ b/be/src/runtime/plan_fragment_executor.cpp
@@ -206,6 +206,7 @@ Status PlanFragmentExecutor::prepare(const TExecPlanFragmentParams& request) {
         _collect_query_statistics_with_every_batch = params.__isset.send_query_statistics_with_every_batch ?
             params.send_query_statistics_with_every_batch : false;
     } else {
+        // _sink is set to NULL
         _sink.reset(NULL);
     }
 
@@ -222,7 +223,9 @@ Status PlanFragmentExecutor::prepare(const TExecPlanFragmentParams& request) {
     _prepared = true;
 
     _query_statistics.reset(new QueryStatistics());
-    _sink->set_query_statistics(_query_statistics);
+    if (_sink.get() != NULL) {
+        _sink->set_query_statistics(_query_statistics);
+    }
     return Status::OK();
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org