initialize saved_gxid and saved_global_gxid in GTM_RestoreTxnInfo
authorTomas Vondra <[email protected]>
Tue, 23 Aug 2016 08:26:36 +0000 (10:26 +0200)
committerPavan Deolasee <[email protected]>
Thu, 25 Aug 2016 04:44:29 +0000 (10:14 +0530)
Without the control file (ctlf==NULL), the two gxid variables were
not initialized. Set them both to InvalidGlobalTransactionId.

src/gtm/main/main.c

index ea8241536f88dedd424176a9b78394d9adf61e57..c51dc9e36bc9cb54aede7a97a9b2add92b7f9498 100644 (file)
@@ -2320,8 +2320,8 @@ void
 GTM_RestoreTxnInfo(FILE *ctlf, GlobalTransactionId next_gxid,
                struct GTM_RestoreContext *context, bool force_xid)
 {
-       GlobalTransactionId saved_gxid;
-       GlobalTransactionId saved_global_xmin;
+       GlobalTransactionId saved_gxid = InvalidGlobalTransactionId;
+       GlobalTransactionId saved_global_xmin = InvalidGlobalTransactionId;
 
        if (ctlf)
        {