File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 27
27
*
28
28
*
29
29
* IDENTIFICATION
30
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.111 2000/04/07 00:59:17 tgl Exp $
30
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.112 2000/04/07 07:24:47 vadim Exp $
31
31
*
32
32
*-------------------------------------------------------------------------
33
33
*/
@@ -2022,15 +2022,21 @@ EndEvalPlanQual(EState *estate)
2022
2022
EState * epqstate = & (epq -> estate );
2023
2023
evalPlanQual * oldepq ;
2024
2024
2025
- if (epq -> rti == 0 ) /* still live? */
2025
+ if (epq -> rti == 0 ) /* plans already shutdowned */
2026
+ {
2027
+ Assert (epq -> estate .es_evalPlanQual == NULL );
2026
2028
return ;
2029
+ }
2027
2030
2028
2031
for (;;)
2029
2032
{
2030
2033
ExecEndNode (epq -> plan , epq -> plan );
2031
2034
epqstate -> es_tupleTable -> next = 0 ;
2032
- heap_freetuple (epqstate -> es_evTuple [epq -> rti - 1 ]);
2033
- epqstate -> es_evTuple [epq -> rti - 1 ] = NULL ;
2035
+ if (epqstate -> es_evTuple [epq -> rti - 1 ] != NULL )
2036
+ {
2037
+ heap_freetuple (epqstate -> es_evTuple [epq -> rti - 1 ]);
2038
+ epqstate -> es_evTuple [epq -> rti - 1 ] = NULL ;
2039
+ }
2034
2040
/* pop old PQ from the stack */
2035
2041
oldepq = (evalPlanQual * ) epqstate -> es_evalPlanQual ;
2036
2042
if (oldepq == (evalPlanQual * ) NULL )
You can’t perform that action at this time.
0 commit comments