mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Fix thinko for case of outer join where inner table is empty: should
output first outer tuple before advancing...
This commit is contained in:
parent
47e229760a
commit
780992316f
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.39 2000/11/16 22:30:22 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.40 2000/12/13 23:45:46 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -537,12 +537,13 @@ ExecMergeJoin(MergeJoin *node)
|
||||
if (doFillOuter)
|
||||
{
|
||||
/*
|
||||
* Need to emit left-join tuples for remaining
|
||||
* outer tuples. We set MatchedOuter = true to
|
||||
* force the ENDINNER state to advance outer.
|
||||
* Need to emit left-join tuples for all outer tuples,
|
||||
* including the one we just fetched. We set
|
||||
* MatchedOuter = false to force the ENDINNER state
|
||||
* to emit this tuple before advancing outer.
|
||||
*/
|
||||
mergestate->mj_JoinState = EXEC_MJ_ENDINNER;
|
||||
mergestate->mj_MatchedOuter = true;
|
||||
mergestate->mj_MatchedOuter = false;
|
||||
break;
|
||||
}
|
||||
/* Otherwise we're done. */
|
||||
|
Loading…
Reference in New Issue
Block a user