You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2022/11/24 08:10:51 UTC

[hawq] branch master updated (c3f4e25d6 -> 83b450335)

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

ztao1987 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git


 discard c3f4e25d6 HAWQ-1841. Fix early free on savedSeqServerHost
     new 83b450335 HAWQ-1851. Fix early free on savedSeqServerHost

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c3f4e25d6)
            \
             N -- N -- N   refs/heads/master (83b450335)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[hawq] 01/01: HAWQ-1851. Fix early free on savedSeqServerHost

Posted by zt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git

commit 83b45033531585aa889a195ab6bb2a007b17144a
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Thu Nov 24 16:10:32 2022 +0800

    HAWQ-1851. Fix early free on savedSeqServerHost
---
 src/backend/cdb/motion/ic_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backend/cdb/motion/ic_common.c b/src/backend/cdb/motion/ic_common.c
index b5a222ee4..4defd2d01 100644
--- a/src/backend/cdb/motion/ic_common.c
+++ b/src/backend/cdb/motion/ic_common.c
@@ -630,7 +630,7 @@ SetupSequenceServer(const char *host, int port)
 		 * See MPP-10162: certain PL/PGSQL functions may call us multiple
 		 * times without an intervening Teardown.
 		 */
-		if (savedSeqServerHost != NULL)
+		if (savedSeqServerHost != NULL && savedSeqServerHost != host)
 		{
 			free(savedSeqServerHost);
 			savedSeqServerHost = NULL;
@@ -641,7 +641,9 @@ SetupSequenceServer(const char *host, int port)
 		 * Don't use MemoryContexts -- they make error handling
 		 * difficult here.
 		 */
-		savedSeqServerHost = strdup(host);
+		if (savedSeqServerHost != host) {
+			savedSeqServerHost = strdup(host);
+		}
 
 		if (savedSeqServerHost == NULL)
 		{