8000 Fix breakage in hashjoin from recent backpatch of left-join bug fix. · postgres/postgres@7b09190 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 7b09190

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 44ed69c commit 7b09190

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.39.2.1 2004/09/17 18:29:40 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.39.2.2 2004/10/13 21:56:14 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
/* ----------------------------------------------------------------
@@ -154,7 +154,7 @@ ExecHashJoin(HashJoin *node)
154154
if (hjstate->hj_NeedNewOuter)
155155
{
156156
outerTupleSlot = ExecHashJoinOuterGetTuple(outerNode,
157-
(Plan *) node,
157+
node,
158158
hjstate);
159159
if (TupIsNull(outerTupleSlot))
160160
{
@@ -470,23 +470,23 @@ ExecEndHashJoin(HashJoin *node)
470470
*/
471471

472472
static TupleTableSlot *
473-
ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate)
473+
ExecHashJoinOuterGetTuple(Plan *node, HashJoin *parent, HashJoinState *hjstate)
474474
{
475475
HashJoinTable hashtable = hjstate->hj_HashTable;
476476
int curbatch = hashtable->curbatch;
477477
TupleTableSlot *slot;
478478

479479
if (curbatch == 0)
480480
{ /* if it is the first pass */
481-
slot = ExecProcNode(node, parent);
481+
slot = ExecProcNode(node, (Plan *) parent);
482482
if (!TupIsNull(slot))
483483
return slot;
484484

485485
/*
486486
* We have just reached the end of the first pass. Try to switch
487487
* to a saved batch.
488488
*/
489-
curbatch = ExecHashJoinNewBatch(hjstate);
489+
curbatch = ExecHashJoinNewBatch(hjstate, parent);
490490
}
491491

492492
/*
@@ -500,7 +500,7 @@ ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate)
500500
hjstate->hj_OuterTupleSlot);
501501
if (!TupIsNull(slot))
502502
return slot;
503-
curbatch = ExecHashJoinNewBatch(hjstate);
503+
curbatch = ExecHashJoinNewBatch(hjstate, parent);
504504
}
505505

506506
/* Out of batches... */
@@ -546,7 +546,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
546546
* ----------------------------------------------------------------
547547
*/
548548
static int
549-
ExecHashJoinNewBatch(HashJoinState *hjstate)
549+
ExecHashJoinNewBatch(HashJoinState *hjstate, HashJoin *node)
550550
{
551551
HashJoinTable hashtable = hjstate->hj_HashTable;
552552
int nbatch = hashtable->nbatch;
@@ -576,7 +576,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
576576
while (newbatch <= nbatch &&
577577
(outerBatchSize[newbatch - 1] == 0L ||
578578
(innerBatchSize[newbatch - 1] == 0L &&
579-
hjstate->js.jointype != JOIN_LEFT)))
579+
node->join.jointype != JOIN_LEFT)))
580580
{
581581
BufFileClose(hashtable->innerBatchFile[newbatch - 1]);
582582
hashtable->innerBatchFile[newbatch - 1] = NULL;

0 commit comments

Comments
 (0)
0