~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/backend/executor/nodeHashjoin.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *        $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.100 2009/04/02 20:59:10 momjian Exp $
 
11
 *        $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.101 2009/06/11 14:48:57 momjian Exp $
12
12
 *
13
13
 *-------------------------------------------------------------------------
14
14
 */
23
23
 
24
24
 
25
25
/* Returns true for JOIN_LEFT and JOIN_ANTI jointypes */
26
 
#define HASHJOIN_IS_OUTER(hjstate)  ((hjstate)->hj_NullInnerTupleSlot != NULL)
 
26
#define HASHJOIN_IS_OUTER(hjstate)      ((hjstate)->hj_NullInnerTupleSlot != NULL)
27
27
 
28
28
static TupleTableSlot *ExecHashJoinOuterGetTuple(PlanState *outerNode,
29
29
                                                  HashJoinState *hjstate,
210
210
 
211
211
                        /*
212
212
                         * Now we've got an outer tuple and the corresponding hash bucket,
213
 
                         * but it might not belong to the current batch, or it might
214
 
                         * match a skew bucket.
 
213
                         * but it might not belong to the current batch, or it might match
 
214
                         * a skew bucket.
215
215
                         */
216
216
                        if (batchno != hashtable->curbatch &&
217
217
                                node->hj_CurSkewBucketNo == INVALID_SKEW_BUCKET_NO)
656
656
                        BufFileClose(hashtable->outerBatchFile[curbatch]);
657
657
                hashtable->outerBatchFile[curbatch] = NULL;
658
658
        }
659
 
        else                                            /* we just finished the first batch */
 
659
        else    /* we just finished the first batch */
660
660
        {
661
661
                /*
662
 
                 * Reset some of the skew optimization state variables, since we
663
 
                 * no longer need to consider skew tuples after the first batch.
664
 
                 * The memory context reset we are about to do will release the
665
 
                 * skew hashtable itself.
 
662
                 * Reset some of the skew optimization state variables, since we no
 
663
                 * longer need to consider skew tuples after the first batch. The
 
664
                 * memory context reset we are about to do will release the skew
 
665
                 * hashtable itself.
666
666
                 */
667
667
                hashtable->skewEnabled = false;
668
668
                hashtable->skewBucket = NULL;