Skip to content

Commit 199fb54

Browse files
committed
Fix breakage in hashjoin from recent backpatch of left-join bug fix.
(That's what I get for not testing the back branches *before* committing.)
1 parent f4d5c52 commit 199fb54

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/backend/executor/nodeHashjoin.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.38.2.1 2004/09/17 18:29:54 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.38.2.2 2004/10/13 21:56:22 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -23,13 +23,13 @@
2323
#include "utils/memutils.h"
2424

2525

26-
static TupleTableSlot *ExecHashJoinOuterGetTuple(Plan *node, Plan *parent,
26+
static TupleTableSlot *ExecHashJoinOuterGetTuple(Plan *node, HashJoin *parent,
2727
HashJoinState *hjstate);
2828
static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
2929
BufFile *file,
3030
TupleTableSlot *tupleSlot);
3131
static int ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable);
32-
static int ExecHashJoinNewBatch(HashJoinState *hjstate);
32+
static int ExecHashJoinNewBatch(HashJoinState *hjstate, HashJoin *node);
3333

3434

3535
/* ----------------------------------------------------------------
@@ -155,7 +155,7 @@ ExecHashJoin(HashJoin *node)
155155
if (hjstate->hj_NeedNewOuter)
156156
{
157157
outerTupleSlot = ExecHashJoinOuterGetTuple(outerNode,
158-
(Plan *) node,
158+
node,
159159
hjstate);
160160
if (TupIsNull(outerTupleSlot))
161161
{
@@ -475,23 +475,23 @@ ExecEndHashJoin(HashJoin *node)
475475
*/
476476

477477
static TupleTableSlot *
478-
ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate)
478+
ExecHashJoinOuterGetTuple(Plan *node, HashJoin *parent, HashJoinState *hjstate)
479479
{
480480
HashJoinTable hashtable = hjstate->hj_HashTable;
481481
int curbatch = hashtable->curbatch;
482482
TupleTableSlot *slot;
483483

484484
if (curbatch == 0)
485485
{ /* if it is the first pass */
486-
slot = ExecProcNode(node, parent);
486+
slot = ExecProcNode(node, (Plan *) parent);
487487
if (!TupIsNull(slot))
488488
return slot;
489489

490490
/*
491491
* We have just reached the end of the first pass. Try to switch
492492
* to a saved batch.
493493
*/
494-
curbatch = ExecHashJoinNewBatch(hjstate);
494+
curbatch = ExecHashJoinNewBatch(hjstate, parent);
495495
}
496496

497497
/*
@@ -505,7 +505,7 @@ ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate)
505505
hjstate->hj_OuterTupleSlot);
506506
if (!TupIsNull(slot))
507507
return slot;
508-
curbatch = ExecHashJoinNewBatch(hjstate);
508+
curbatch = ExecHashJoinNewBatch(hjstate, parent);
509509
}
510510

511511
/* Out of batches... */
@@ -551,7 +551,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
551551
* ----------------------------------------------------------------
552552
*/
553553
static int
554-
ExecHashJoinNewBatch(HashJoinState *hjstate)
554+
ExecHashJoinNewBatch(HashJoinState *hjstate, HashJoin *node)
555555
{
556556
HashJoinTable hashtable = hjstate->hj_HashTable;
557557
int nbatch = hashtable->nbatch;
@@ -582,7 +582,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
582582
while (newbatch <= nbatch &&
583583
(outerBatchSize[newbatch - 1] == 0L ||
584584
(innerBatchSize[newbatch - 1] == 0L &&
585-
hjstate->js.jointype != JOIN_LEFT)))
585+
node->join.jointype != JOIN_LEFT)))
586586
{
587587
BufFileClose(hashtable->innerBatchFile[newbatch - 1]);
588588
hashtable->innerBatchFile[newbatch - 1] = NULL;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy