Commit 3c5985b4 authored by Tom Lane's avatar Tom Lane

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.
parent eab6b8b2
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.110 2007/01/30 01:33:36 tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.111 2007/02/22 22:49:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -731,7 +731,10 @@ ExecHashGetHashValue(HashJoinTable hashtable,
if (isNull)
{
if (hashtable->hashStrict[i] && !keep_nulls)
return false; /* cannot match */
{
MemoryContextSwitchTo(oldContext);
return false; /* cannot match */
}
/* else, leave hashkey unmodified, equivalent to hashcode 0 */
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment