aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-02-22 22:49:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-02-22 22:49:27 +0000
commit3c5985b473024f45005c8b4776d4d63ed2d39d82 (patch)
tree197fdc84399f93e17cda2b7f56595285dcd61213 /src
parenteab6b8b27eba54b8fd0ad3f64989d12200979c96 (diff)
downloadpostgresql-3c5985b473024f45005c8b4776d4d63ed2d39d82.tar.gz
postgresql-3c5985b473024f45005c8b4776d4d63ed2d39d82.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/executor/nodeHash.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index 88d9360e422..a6da272d47c 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -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