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

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 0c038c268eb9cea649f07243172805363efc964f
Author: Soumyadeep Chakraborty <[email protected]>
AuthorDate: Wed May 1 11:05:54 2024 -0700

    cdbdisp: Set numResults output variable
    
    It wasn't being set in the error path, leading to gibberish in the
    caller. Even though it isn't used in the error path in the caller (now),
    initialize it all the same, for debugging/future use.
---
 src/backend/cdb/dispatcher/cdbdisp_dtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/backend/cdb/dispatcher/cdbdisp_dtx.c 
b/src/backend/cdb/dispatcher/cdbdisp_dtx.c
index 902d32efb1..bee9ee6143 100644
--- a/src/backend/cdb/dispatcher/cdbdisp_dtx.c
+++ b/src/backend/cdb/dispatcher/cdbdisp_dtx.c
@@ -119,6 +119,7 @@ CdbDispatchDtxProtocolCommand(DtxProtocolCommand 
dtxProtocolCommand,
 
        if (!pr)
        {
+               *numresults = 0;
                cdbdisp_destroyDispatcherState(ds);
                return NULL;
        }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to