mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Properly initialize variables
Kevin Grittner
This commit is contained in:
parent
bc423879cc
commit
45a6d79b17
@ -2535,9 +2535,12 @@ TransferPredicateLocksToNewTarget(const PREDICATELOCKTARGETTAG oldtargettag,
|
|||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
SHMQueueInit(&(newtarget->predicateLocks));
|
SHMQueueInit(&(newtarget->predicateLocks));
|
||||||
newpredlocktag.myTarget = newtarget;
|
newtarget->priorVersionOfRow = NULL;
|
||||||
|
newtarget->nextVersionOfRow = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newpredlocktag.myTarget = newtarget;
|
||||||
|
|
||||||
oldpredlock = (PREDICATELOCK *)
|
oldpredlock = (PREDICATELOCK *)
|
||||||
SHMQueueNext(&(oldtarget->predicateLocks),
|
SHMQueueNext(&(oldtarget->predicateLocks),
|
||||||
&(oldtarget->predicateLocks),
|
&(oldtarget->predicateLocks),
|
||||||
@ -2586,10 +2589,14 @@ TransferPredicateLocksToNewTarget(const PREDICATELOCKTARGETTAG oldtargettag,
|
|||||||
outOfShmem = true;
|
outOfShmem = true;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
SHMQueueInsertBefore(&(newtarget->predicateLocks),
|
SHMQueueInsertBefore(&(newtarget->predicateLocks),
|
||||||
&(newpredlock->targetLink));
|
&(newpredlock->targetLink));
|
||||||
SHMQueueInsertBefore(&(newpredlocktag.myXact->predicateLocks),
|
SHMQueueInsertBefore(&(newpredlocktag.myXact->predicateLocks),
|
||||||
&(newpredlock->xactLink));
|
&(newpredlock->xactLink));
|
||||||
|
newpredlock->commitSeqNo = InvalidSerCommitSeqNo;
|
||||||
|
}
|
||||||
|
|
||||||
oldpredlock = nextpredlock;
|
oldpredlock = nextpredlock;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user