Properly initialize variables

Kevin Grittner
This commit is contained in:
Magnus Hagander 2011-02-18 11:59:57 +01:00
parent bc423879cc
commit 45a6d79b17

View File

@ -2535,9 +2535,12 @@ TransferPredicateLocksToNewTarget(const PREDICATELOCKTARGETTAG oldtargettag,
if (!found)
{
SHMQueueInit(&(newtarget->predicateLocks));
newpredlocktag.myTarget = newtarget;
newtarget->priorVersionOfRow = NULL;
newtarget->nextVersionOfRow = NULL;
}
newpredlocktag.myTarget = newtarget;
oldpredlock = (PREDICATELOCK *)
SHMQueueNext(&(oldtarget->predicateLocks),
&(oldtarget->predicateLocks),
@ -2586,10 +2589,14 @@ TransferPredicateLocksToNewTarget(const PREDICATELOCKTARGETTAG oldtargettag,
outOfShmem = true;
goto exit;
}
SHMQueueInsertBefore(&(newtarget->predicateLocks),
&(newpredlock->targetLink));
SHMQueueInsertBefore(&(newpredlocktag.myXact->predicateLocks),
&(newpredlock->xactLink));
if (!found)
{
SHMQueueInsertBefore(&(newtarget->predicateLocks),
&(newpredlock->targetLink));
SHMQueueInsertBefore(&(newpredlocktag.myXact->predicateLocks),
&(newpredlock->xactLink));
newpredlock->commitSeqNo = InvalidSerCommitSeqNo;
}
oldpredlock = nextpredlock;
}