Skip to content

Commit 3c5985b

Browse files
committed
Fix bug I introduced in recent patch to make hash joins discard null tuples
immediately: ExecHashGetHashValue failed to restore the caller's memory context before taking the failure exit.
1 parent eab6b8b commit 3c5985b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/executor/nodeHash.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.110 2007/01/30 01:33:36 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.111 2007/02/22 22:49:27 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -731,7 +731,10 @@ ExecHashGetHashValue(HashJoinTable hashtable,
731731
if (isNull)
732732
{
733733
if (hashtable->hashStrict[i] && !keep_nulls)
734-
return false; /* cannot match */
734+
{
735+
MemoryContextSwitchTo(oldContext);
736+
return false; /* cannot match */
737+
}
735738
/* else, leave hashkey unmodified, equivalent to hashcode 0 */
736739
}
737740
else

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