[ 
https://issues.apache.org/jira/browse/TRAFODION-3187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585809#comment-16585809
 ] 

ASF GitHub Bot commented on TRAFODION-3187:
-------------------------------------------

GitHub user wenjun-zhu opened a pull request:

    https://github.com/apache/trafodion/pull/1700

    [TRAFODION-3187] increase the ref count

    The original code lacks the ref count increment, compared the correct code, 
so add it now.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wenjun-zhu/trafodion 
jira-3187-ref-count-increment

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1700.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1700
    
----
commit f15c6abe85db8532a51e232900890ca1f22df99a
Author: Adamas <adamas@...>
Date:   2018-08-20T11:21:23Z

    increase the ref count

----


> ref count of ComDiagsArea is not increased 
> -------------------------------------------
>
>                 Key: TRAFODION-3187
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3187
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: -exe
>    Affects Versions: 2.4
>            Reporter: Wenjun Zhu
>            Assignee: Wenjun Zhu
>            Priority: Minor
>             Fix For: 2.4
>
>
> code of ExTupleFlowTcb::work() in core/sql/executor/ex_tuple_flow.cpp
> {code:java}
> 308 if ((pstate.tgtRowsSent_ == FALSE) &&
> 309 (src_entry->getDiagsArea()))
> 310 {
> 311 // a warning is returned with EOD and
> 312 // nothing else was returned from source.
> 313 // Move warning to parent's up queue.
> 314 if (qParent_.up->isFull())
> 315 return WORK_OK;
> 316
> 317 ex_queue_entry * up_entry =
> 318 qParent_.up->getTailEntry();
> 319 up_entry->setDiagsArea(src_entry->getDiagsArea());
> 320 }
> {code}
> has not increased the ref count, compared to the following correct one:
>  
> {code:java}
> 294   if (from->getDiagsArea())
> 295     from->getDiagsArea()->incrRefCount();
> 296
> 297   setDiagsArea(from->getDiagsArea());
> {code}
> of atp_struct::copyAtp() in ore/sql/exp/ExpAtp.h
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to