File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 26
26
*
27
27
*
28
28
* IDENTIFICATION
29
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.72 1999/02/07 13:37:55 wieck Exp $
29
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.73 1999/02/07 13:54:58 wieck Exp $
30
30
*
31
31
*-------------------------------------------------------------------------
32
32
*/
@@ -131,14 +131,19 @@ ExecutorStart(QueryDesc *queryDesc, EState *estate)
131
131
/*
132
132
* Make our own private copy of the current queries snapshot data
133
133
*/
134
- estate -> es_snapshot = ( Snapshot ) palloc ( sizeof ( SnapshotData ));
135
- memcpy ( estate -> es_snapshot , QuerySnapshot , sizeof ( SnapshotData ));
136
- if ( estate -> es_snapshot -> xcnt > 0 )
134
+ if ( QuerySnapshot == NULL )
135
+ estate -> es_snapshot = NULL
136
+ else
137
137
{
138
- estate -> es_snapshot -> xip = (TransactionId * )
138
+ estate -> es_snapshot = (Snapshot )palloc (sizeof (SnapshotData ));
139
+ memcpy (estate -> es_snapshot , QuerySnapshot , sizeof (SnapshotData ));
140
+ if (estate -> es_snapshot -> xcnt > 0 )
141
+ {
142
+ estate -> es_snapshot -> xip = (TransactionId * )
139
143
palloc (estate -> es_snapshot -> xcnt * sizeof (TransactionId ));
140
- memcpy (estate -> es_snapshot -> xip , QuerySnapshot -> xip ,
144
+ memcpy (estate -> es_snapshot -> xip , QuerySnapshot -> xip ,
141
145
estate -> es_snapshot -> xcnt * sizeof (TransactionId ));
146
+ }
142
147
}
143
148
144
149
/*
You can’t perform that action at this time.
0 commit comments