Skip to content

Commit 02ed44b

Browse files
committed
fix CommitPrepared parse after varlen gid patch
1 parent 63bbdf3 commit 02ed44b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/access/transam/twophase.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,9 @@ ParsePrepareRecord(uint8 info, char *xlrec, xl_xact_parsed_prepare *parsed)
12491249
hdr = (TwoPhaseFileHeader *) xlrec;
12501250
bufptr = xlrec + MAXALIGN(sizeof(TwoPhaseFileHeader));
12511251

1252+
strncpy(parsed->twophase_gid, bufptr, hdr->gidlen);
1253+
bufptr += MAXALIGN(hdr->gidlen);
1254+
12521255
parsed->twophase_xid = hdr->xid;
12531256
parsed->dbId = hdr->database;
12541257
parsed->nsubxacts = hdr->nsubxacts;
@@ -1266,8 +1269,6 @@ ParsePrepareRecord(uint8 info, char *xlrec, xl_xact_parsed_prepare *parsed)
12661269

12671270
parsed->msgs = (SharedInvalidationMessage *) bufptr;
12681271
bufptr += MAXALIGN(hdr->ninvalmsgs * sizeof(SharedInvalidationMessage));
1269-
1270-
strncpy(parsed->twophase_gid, bufptr, hdr->gidlen);
12711272
}
12721273

12731274

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy