mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
SET TRANSACTION ISOLATION LEVEL ...
LOCK TABLE IN ... MODE ...implemented
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.22 1998/12/16 11:53:55 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.23 1998/12/18 09:10:39 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ SnapshotData SnapshotDirtyData;
|
||||
Snapshot SnapshotDirty = &SnapshotDirtyData;
|
||||
|
||||
Snapshot QuerySnapshot = NULL;
|
||||
static Snapshot SerializedSnapshot = NULL;
|
||||
Snapshot SerializableSnapshot = NULL;
|
||||
|
||||
/*
|
||||
* XXX Transaction system override hacks start here
|
||||
@@ -551,24 +551,24 @@ SetQuerySnapshot(void)
|
||||
{
|
||||
|
||||
/* 1st call in xaction */
|
||||
if (SerializedSnapshot == NULL)
|
||||
if (SerializableSnapshot == NULL)
|
||||
{
|
||||
SerializedSnapshot = GetSnapshotData();
|
||||
QuerySnapshot = SerializedSnapshot;
|
||||
SerializableSnapshot = GetSnapshotData(true);
|
||||
QuerySnapshot = SerializableSnapshot;
|
||||
Assert(QuerySnapshot != NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (QuerySnapshot != SerializedSnapshot)
|
||||
if (QuerySnapshot != SerializableSnapshot)
|
||||
{
|
||||
free(QuerySnapshot->xip);
|
||||
free(QuerySnapshot);
|
||||
}
|
||||
|
||||
if (XactIsoLevel == XACT_SERIALIZED)
|
||||
QuerySnapshot = SerializedSnapshot;
|
||||
if (XactIsoLevel == XACT_SERIALIZABLE)
|
||||
QuerySnapshot = SerializableSnapshot;
|
||||
else
|
||||
QuerySnapshot = GetSnapshotData();
|
||||
QuerySnapshot = GetSnapshotData(false);
|
||||
|
||||
Assert(QuerySnapshot != NULL);
|
||||
|
||||
@@ -578,7 +578,7 @@ void
|
||||
FreeXactSnapshot(void)
|
||||
{
|
||||
|
||||
if (QuerySnapshot != NULL && QuerySnapshot != SerializedSnapshot)
|
||||
if (QuerySnapshot != NULL && QuerySnapshot != SerializableSnapshot)
|
||||
{
|
||||
free(QuerySnapshot->xip);
|
||||
free(QuerySnapshot);
|
||||
@@ -586,12 +586,12 @@ FreeXactSnapshot(void)
|
||||
|
||||
QuerySnapshot = NULL;
|
||||
|
||||
if (SerializedSnapshot != NULL)
|
||||
if (SerializableSnapshot != NULL)
|
||||
{
|
||||
free(SerializedSnapshot->xip);
|
||||
free(SerializedSnapshot);
|
||||
free(SerializableSnapshot->xip);
|
||||
free(SerializableSnapshot);
|
||||
}
|
||||
|
||||
SerializedSnapshot = NULL;
|
||||
SerializableSnapshot = NULL;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user