You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Chunling Wang (JIRA)" <ji...@apache.org> on 2016/03/14 07:50:33 UTC

[jira] [Commented] (HAWQ-524) do not resolve the condition of 'executor->refResult = NULL' in executormgr_bind_executor_task()

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

Chunling Wang commented on HAWQ-524:
------------------------------------

In cdbdispatcheresult.c, when dispatchResult->resultbuf == NULL, there is no need to free the PGresult objects again in function cdbdisp_resetResult(). Change the code like below:
void
cdbdisp_resetResult(CdbDispatchResult  *dispatchResult)
{
	if (dispatchResult->resultbuf != NULL)
	{
		PQExpBuffer buf = dispatchResult->resultbuf;
		PGresult  **begp = (PGresult **)buf->data;
    		PGresult  **endp = (PGresult **)(buf->data + buf->len);
    		PGresult  **p;

    		/* Free the PGresult objects. */
    		for (p = begp; p < endp; ++p)
    		{
    			Assert(*p != NULL);
    			PQclear(*p);
    		}
	}
	...
}

> do not resolve the condition of 'executor->refResult = NULL' in executormgr_bind_executor_task() 
> -------------------------------------------------------------------------------------------------
>
>                 Key: HAWQ-524
>                 URL: https://issues.apache.org/jira/browse/HAWQ-524
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Dispatcher
>    Affects Versions: 2.0.0
>            Reporter: Chunling Wang
>            Assignee: Lei Chang
>
> In executormgr.c, the code below should not be Assert(). The condition of 'executor->refResult = NULL' should be catch.
> bool
> executormgr_bind_executor_task(struct DispatchData *data,
> 							QueryExecutor *executor,
> 							SegmentDatabaseDescriptor *desc,
> 							struct DispatchTask *task,
> 							struct DispatchSlice *slice)
> {
> 	...
> 	Assert(executor->refResult != NULL);
> 	...
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)