1: #
   2: /*
   3: **	This header file contains all the defined constant
   4: **	and special structures used by decomposition. Certain
   5: **	global variables which are referenced by many modules
   6: **	are also included. By convention global names always
   7: **	begin with a capital letter.
   8: */
   9: 
  10: 
  11: 
  12: 
  13: # define OVHDP      2       /*  overhead for a projection  */
  14: # define OVHDM      10      /*  overhead for a modify  */
  15: 
  16: # define MAXRELN    6       /* size of relation descriptor cache */
  17: # define MAXRANGE   MAXVAR+1    /* size of range table for source
  18: 					** and result relations. This size
  19: 					** must match size of parser range table
  20: 					*/
  21: 
  22: # define QBUFSIZ    2000        /* buffer size (bytes) of original query tree */
  23: # define SQSIZ      3400        /* buffer size for tree copies + sub-queries */
  24: # define AGBUFSIZ   350     /* buffer size for temp agg tree components */
  25: # define PBUFSIZE   500     /* size of parameter buffer area for setp() */
  26: # define PARGSIZE   MAXPARMS    /* max number of arguments for setp() */
  27: 
  28: /* error messages */
  29: # define NODESCAG   4602    /* no descriptor for aggr func */
  30: # define QBUFFULL   4610    /* Initial query buffer overflow */
  31: # define SQBUFFULL  4612    /* sub-query buffer overflow */
  32: # define STACKFULL  4613    /* trbuild stack overflow */
  33: # define AGBUFFULL  4614    /* agg buffer overflow */
  34: # define AGFTOBIG   4615    /* agg function exceeds MAXTUP or MAXDOM */
  35: # define RETUTOBIG  4620    /* retr unique target list exceeds MAXTUP */
  36: 
  37: /* symbolic values for GETNXT parameter of fcn GET */
  38: # define NXTTUP 1   /* get next tuple after one specified by tid */
  39: 
  40: /* flag for no result relation */
  41: # define    NORESULT    -1
  42: 
  43: /* Range table slot which is always free for aggregate temp rels */
  44: # define    FREEVAR     MAXRANGE    /* free var number for aggs */
  45: 
  46: /* Range table slot which is used for secondary index */
  47: # define    SECINDVAR   MAXRANGE + 1
  48: 
  49: 
  50: int Qmode;      /* flag set to indicate mode of tuple disposition */
  51: int Resultvar;  /* if >= 0 result variable */
  52: int Sourcevar;  /* likewise for source variable */
  53: int Newq;       /* OVPQ must devise new strategy */
  54: int Newr;       /* force OVQP to reopen result relation */
  55: int R_ovqp;     /* pipe for reading from ovqp */
  56: int W_ovqp;     /* pipe for writing to ovqp */
  57: int R_dbu;      /* ditto dbu */
  58: int W_dbu;      /* ditto dbu */
  59: 
  60: 
  61: 
  62: /* range table structure */
  63: struct rang_tab
  64: {
  65:     int     relnum;     /* internal decomp relation number */
  66:     int     rtspec;     /* relspec of relation */
  67:     int     rtstat;     /* relstat of relation */
  68:     int     rtwid;      /* relwidth of relation */
  69:     long        rtcnt;      /* tupcount of relation */
  70:     int     rtaltnum;   /* reserved for distributed decomp */
  71:     char        *rtattmap;  /* reserved for distributed decomp */
  72:     long        rtdcnt;     /* reserved for distributed decomp */
  73:     struct d_range  *rtsrange;  /* reserved for distributed decomp */
  74: };
  75: 
  76: extern struct rang_tab  Rangev[];
  77: 
  78: 
  79: /* structure used by reduction to maintain component pieces */
  80: struct complist
  81: {
  82:     struct complist     *nextcomp;  /* next comp piece */
  83:     struct complist     *linkcomp;  /* next clause of this comp */
  84:     struct querytree    *clause;    /* associated clause */
  85:     int         bitmap;     /* map of all assoc clauses */
  86: };
  87: 
  88: 
  89: /* globals used to hold original query and range table */
  90: char            Qbuf[QBUFSIZ];      /* buffer which holds symbol lists */
  91: struct querytree    *Qle;           /* ptr to QLEND node */
  92: struct querytree    *Tr;            /* ptr to TREE node */
  93: 
  94: 
  95: /* The following structure reserved for distributed decomp */
  96: struct d_range
  97: {
  98:     int     relnum;
  99:     long        drtupcnt;
 100:     char        drsite[2];
 101:     int     draltnum;
 102:     int     drstat;
 103:     struct d_range  *drnext;
 104: };

Defined variables

Qmode defined in line 50; used 3 times
W_ovqp defined in line 56; used 12 times

Defined struct's

complist defined in line 80; used 42 times
d_range defined in line 96; used 3 times
rang_tab defined in line 63; used 22 times

Defined macros

AGFTOBIG defined in line 34; used 1 times
FREEVAR defined in line 44; used 9 times
MAXRELN defined in line 16; used 10 times
NODESCAG defined in line 29; used 1 times
NXTTUP defined in line 38; used 1 times
OVHDM defined in line 14; used 2 times
OVHDP defined in line 13; used 3 times
PARGSIZE defined in line 26; used 2 times
PBUFSIZE defined in line 25; used 2 times
QBUFSIZ defined in line 22; used 2 times
RETUTOBIG defined in line 35; never used
SECINDVAR defined in line 47; used 1 times
SQBUFFULL defined in line 31; used 1 times
SQSIZ defined in line 23; used 2 times
STACKFULL defined in line 32; used 1 times

Usage of this include

decomp.h used 32 times
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1557
Valid CSS Valid XHTML 1.0 Strict