mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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.
This commit is contained in:
parent
eab6b8b27e
commit
3c5985b473
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 (isNull)
|
||||||
{
|
{
|
||||||
if (hashtable->hashStrict[i] && !keep_nulls)
|
if (hashtable->hashStrict[i] && !keep_nulls)
|
||||||
|
{
|
||||||
|
MemoryContextSwitchTo(oldContext);
|
||||||
return false; /* cannot match */
|
return false; /* cannot match */
|
||||||
|
}
|
||||||
/* else, leave hashkey unmodified, equivalent to hashcode 0 */
|
/* else, leave hashkey unmodified, equivalent to hashcode 0 */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user