|
13 | 13 | * columns. (ie. tuples from the same group are consecutive)
|
14 | 14 | *
|
15 | 15 | * IDENTIFICATION
|
16 |
| - * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.26 1999/05/25 16:08:41 momjian Exp $ |
| 16 | + * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.27 1999/07/11 01:57:32 tgl Exp $ |
17 | 17 | *
|
18 | 18 | *-------------------------------------------------------------------------
|
19 | 19 | */
|
@@ -271,6 +271,7 @@ ExecInitGroup(Group *node, EState *estate, Plan *parent)
|
271 | 271 | node->grpstate=grpstate;
|
272 | 272 | grpstate->grp_useFirstTuple= FALSE;
|
273 | 273 | grpstate->grp_done= FALSE;
|
| 274 | +grpstate->grp_firstTuple=NULL; |
274 | 275 |
|
275 | 276 | /*
|
276 | 277 | * assign node's base id and create expression context
|
@@ -423,6 +424,11 @@ ExecReScanGroup(Group *node, ExprContext *exprCtxt, Plan *parent)
|
423 | 424 |
|
424 | 425 | grpstate->grp_useFirstTuple= FALSE;
|
425 | 426 | grpstate->grp_done= FALSE;
|
| 427 | +if (grpstate->grp_firstTuple!=NULL) |
| 428 | +{ |
| 429 | +pfree(grpstate->grp_firstTuple); |
| 430 | +grpstate->grp_firstTuple=NULL; |
| 431 | +} |
426 | 432 |
|
427 | 433 | if (((Plan*)node)->lefttree&&
|
428 | 434 | ((Plan*)node)->lefttree->chgParam==NULL)
|
|