Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cbd349

Browse files
committed
ExecReScanGroup() forgot to clear grpstate->grp_firstTuple,
thereby guaranteeing wrong results from a rescanned Group node.
1 parentebc3cc7 commit9cbd349

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/executor/nodeGroup.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* columns. (ie. tuples from the same group are consecutive)
1414
*
1515
* 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 $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -271,6 +271,7 @@ ExecInitGroup(Group *node, EState *estate, Plan *parent)
271271
node->grpstate=grpstate;
272272
grpstate->grp_useFirstTuple= FALSE;
273273
grpstate->grp_done= FALSE;
274+
grpstate->grp_firstTuple=NULL;
274275

275276
/*
276277
* assign node's base id and create expression context
@@ -423,6 +424,11 @@ ExecReScanGroup(Group *node, ExprContext *exprCtxt, Plan *parent)
423424

424425
grpstate->grp_useFirstTuple= FALSE;
425426
grpstate->grp_done= FALSE;
427+
if (grpstate->grp_firstTuple!=NULL)
428+
{
429+
pfree(grpstate->grp_firstTuple);
430+
grpstate->grp_firstTuple=NULL;
431+
}
426432

427433
if (((Plan*)node)->lefttree&&
428434
((Plan*)node)->lefttree->chgParam==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp