# 2.11BSD#431 - /usr/ingres/source/decomp/decomp.h

##### Variables

    Newq              X
    Newr              X
    Qbuf              X
    Qle               X
    Qmode             X
    R_dbu             X
    R_ovqp            X
    Resultvar         X
    Sourcevar         X
    Tr                X
    W_dbu             X
    W_ovqp            X

##### Macros

    AGBUFFULL         X
    AGBUFSIZ          X
    AGFTOBIG          X
    FREEVAR           X
    MAXRANGE          X
    MAXRELN           X
    NODESCAG          X
    NORESULT          X
    NXTTUP            X
    OVHDM             X
    OVHDP             X
    PARGSIZE          X
    PBUFSIZE          X
    QBUFFULL          X
    QBUFSIZ           X
    RETUTOBIG         X
    SECINDVAR         X
    SQBUFFULL         X
    SQSIZ             X
    STACKFULL         X

##### struct's

    complist          X
    d_range           X
    rang_tab          X

       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

Newq defined in line 53; used 12 times

- in /usr/ingres/source/decomp/ageval.c line 102-106(2)
- in /usr/ingres/source/decomp/byeval.c line 249-253(2)
- in /usr/ingres/source/decomp/call_ovqp.c line 65, 90
- in /usr/ingres/source/decomp/decomp.c line 70, 118, 185, 284
- in /usr/ingres/source/decomp/exec_sq.c line 160
- in /usr/ingres/source/decomp/ret_unique.c line 69

Newr defined in line 54; used 8 times

- in /usr/ingres/source/decomp/ageval.c line 103
- in /usr/ingres/source/decomp/byeval.c line 250
- in /usr/ingres/source/decomp/call_ovqp.c line 93-96(2)
- in /usr/ingres/source/decomp/call_ovqp70.c line 104-106(2)
- in /usr/ingres/source/decomp/exec_sq.c line 208
- in /usr/ingres/source/decomp/ret_unique.c line 69

Qbuf defined in line 90; used 10 times

- in /usr/ingres/source/decomp/aggregate.c line 293
- in /usr/ingres/source/decomp/byeval.c line 284, 292, 299
- in /usr/ingres/source/decomp/makenode.c line 122
- in /usr/ingres/source/decomp/qryproc.c line 34
- in /usr/ingres/source/decomp/readq.c line 42-46(3), 73

Qle defined in line 91; used 7 times

- in /usr/ingres/source/decomp/ageval.c line 64
- in /usr/ingres/source/decomp/byeval.c line 171
- in /usr/ingres/source/decomp/call_ovqp70.c line 184
- in /usr/ingres/source/decomp/makenode.c line 83
- in /usr/ingres/source/decomp/qryproc.c line 54
- in /usr/ingres/source/decomp/reduction.c line 193
- in /usr/ingres/source/decomp/ret_unique.c line 58

Qmode defined in line 50; used 3 times

- in /usr/ingres/source/decomp/qryproc.c line 41
- in /usr/ingres/source/decomp/readq.c line 41, 60

R_dbu defined in line 57; used 3 times

- in /usr/ingres/source/decomp/call_dbu.c line 51
- in /usr/ingres/source/decomp/call_dbu70.c line 85
- in /usr/ingres/source/decomp/main.c line 31

R_ovqp defined in line 55; used 6 times

- in /usr/ingres/source/decomp/call_ovqp.c line 162, 202-206(2), 255, 262
- in /usr/ingres/source/decomp/main.c line 29

Resultvar defined in line 51; used 8 times

- in /usr/ingres/source/decomp/qryproc.c line 65-68(2), 79-82(2), 92
- in /usr/ingres/source/decomp/readq.c line 40, 64
- in /usr/ingres/source/decomp/ret_unique.c line 26

Sourcevar defined in line 52; used 33 times

- in /usr/ingres/source/decomp/ageval.c line 91
- in /usr/ingres/source/decomp/aggregate.c line 88-91(3)
- in /usr/ingres/source/decomp/byeval.c line 162-164(2), 210
- in /usr/ingres/source/decomp/call_ovqp.c line 72-74(3), 99-104(2), 330-331(2)
- in /usr/ingres/source/decomp/call_ovqp70.c line 87-89(3), 114-115(2), 307-308(2), 316-317(2)
- in /usr/ingres/source/decomp/decomp.c line 71, 117, 189, 211-213(2), 272-274(2), 280
- in /usr/ingres/source/decomp/exec_sq.c line 159
- in /usr/ingres/source/decomp/ret_unique.c line 68

Tr defined in line 92; used 2 times

- in /usr/ingres/source/decomp/makenode.c line 84
- in /usr/ingres/source/decomp/qryproc.c line 57

W_dbu defined in line 58; used 5 times

- in /usr/ingres/source/decomp/call_dbu.c line 43-44(2)
- in /usr/ingres/source/decomp/call_dbu70.c line 77-78(2)
- in /usr/ingres/source/decomp/main.c line 32

W_ovqp defined in line 56; used 12 times

- in /usr/ingres/source/decomp/call_ovqp.c line 103-104(2), 111-112(2), 149, 247, 291, 323-324(2), 354-358(2)
- in /usr/ingres/source/decomp/main.c line 30

#### Defined struct's

complist defined in line 80; used 42 times

- in line 82-83(4)
- in /usr/ingres/source/decomp/decision.c line 54-56(4), 436(2), 445(2)
- in /usr/ingres/source/decomp/reduction.c line 25(2), 50-53(4), 114(2), 131-141(10), 156(2), 171(2), 205-206(4), 222-223(4)

d_range defined in line 96; used 3 times

- in line 73, 103(2)

rang_tab defined in line 63; used 22 times

- in line 76(2)
- in /usr/ingres/source/decomp/openrs.c line 164(2), 209(2)
- in /usr/ingres/source/decomp/rangetable.c line 10(2), 16(2), 85(2), 109(2)
- in /usr/ingres/source/decomp/reformat.c line 199(2)
- in /usr/ingres/source/decomp/selectv.c line 89(2), 157-159(4)

#### Defined macros

AGBUFFULL defined in line 33; used 2 times

- in /usr/ingres/source/decomp/ageval.c line 57
- in /usr/ingres/source/decomp/byeval.c line 131

AGBUFSIZ defined in line 24; used 4 times

- in /usr/ingres/source/decomp/ageval.c line 43, 57
- in /usr/ingres/source/decomp/byeval.c line 62, 131

AGFTOBIG defined in line 34; used 1 times

- in /usr/ingres/source/decomp/aggregate.c line 117

FREEVAR defined in line 44; used 9 times

- in /usr/ingres/source/decomp/ageval.c line 81, 90-91(2), 97
- in /usr/ingres/source/decomp/byeval.c line 182, 197, 209-212(3)

MAXRANGE defined in line 17; used 34 times

- in line 44-47(2)
- in /usr/ingres/source/decomp/aggregate.c line 373
- in /usr/ingres/source/decomp/decision.c line 60-63(2)
- in /usr/ingres/source/decomp/decomp.c line 49, 99-100(3), 122(2), 156-158(3), 239
- in /usr/ingres/source/decomp/exec_sq.c line 49, 115-119(3), 189
- in /usr/ingres/source/decomp/lockit.c line 19, 37
- in /usr/ingres/source/decomp/openrs.c line 115
- in /usr/ingres/source/decomp/pull_sq.c line 36, 143
- in /usr/ingres/source/decomp/rangetable.c line 10, 18, 91, 117
- in /usr/ingres/source/decomp/reformat.c line 83
- in /usr/ingres/source/decomp/ret_unique.c line 24
- in /usr/ingres/source/decomp/rnum.c line 4
- in /usr/ingres/source/decomp/usubr.c line 228-231(2)

MAXRELN defined in line 16; used 10 times

- in /usr/ingres/source/decomp/openrs.c line 27, 75, 140, 406, 490, 514-519(2), 533-535(2), 547

NODESCAG defined in line 29; used 1 times

- in /usr/ingres/source/decomp/aggregate.c line 389

NORESULT defined in line 41; used 10 times

- in /usr/ingres/source/decomp/ageval.c line 52, 105, 112
- in /usr/ingres/source/decomp/byeval.c line 125, 255
- in /usr/ingres/source/decomp/decision.c line 284
- in /usr/ingres/source/decomp/pull_const.c line 60
- in /usr/ingres/source/decomp/pull_sq.c line 153
- in /usr/ingres/source/decomp/qryproc.c line 80
- in /usr/ingres/source/decomp/ret_unique.c line 70

NXTTUP defined in line 38; used 1 times

- in /usr/ingres/source/decomp/decomp.c line 191

OVHDM defined in line 14; used 2 times

- in /usr/ingres/source/decomp/reformat.c line 268, 306

OVHDP defined in line 13; used 3 times

- in /usr/ingres/source/decomp/reformat.c line 242, 259, 268

PARGSIZE defined in line 26; used 2 times

- in /usr/ingres/source/decomp/usubr.c line 47, 88

PBUFSIZE defined in line 25; used 2 times

- in /usr/ingres/source/decomp/usubr.c line 48, 88

QBUFFULL defined in line 30; used 2 times

- in /usr/ingres/source/decomp/error.c line 14
- in /usr/ingres/source/decomp/qryproc.c line 34

QBUFSIZ defined in line 22; used 2 times

- in line 90
- in /usr/ingres/source/decomp/qryproc.c line 34

RETUTOBIG defined in line 35; never used
SECINDVAR defined in line 47; used 1 times

- in /usr/ingres/source/decomp/call_ovqp70.c line 383

SQBUFFULL defined in line 31; used 1 times

- in /usr/ingres/source/decomp/decomp.c line 104

SQSIZ defined in line 23; used 2 times

- in /usr/ingres/source/decomp/decomp.c line 98, 104

STACKFULL defined in line 32; used 1 times

- in /usr/ingres/source/decomp/qryproc.c line 49

#### Usage of this include

decomp.h used 32 times

- in /usr/ingres/source/decomp/ageval.c line 5
- in /usr/ingres/source/decomp/aggregate.c line 4
- in /usr/ingres/source/decomp/byeval.c line 4
- in /usr/ingres/source/decomp/call_dbu.c line 6
- in /usr/ingres/source/decomp/call_dbu70.c line 7
- in /usr/ingres/source/decomp/call_ovqp.c line 7
- in /usr/ingres/source/decomp/call_ovqp70.c line 7
- in /usr/ingres/source/decomp/decision.c line 4
- in /usr/ingres/source/decomp/decomp.c line 5
- in /usr/ingres/source/decomp/error.c line 5
- in /usr/ingres/source/decomp/exec_sq.c line 5
- in /usr/ingres/source/decomp/lockit.c line 3
- in /usr/ingres/source/decomp/main.c line 5
- in /usr/ingres/source/decomp/makenode.c line 4
- in /usr/ingres/source/decomp/mklist.c line 4
- in /usr/ingres/source/decomp/openrs.c line 5
- in /usr/ingres/source/decomp/printree.c line 3
- in /usr/ingres/source/decomp/prlinks.c line 4
- in /usr/ingres/source/decomp/pull_const.c line 4
- in /usr/ingres/source/decomp/pull_sq.c line 4
- in /usr/ingres/source/decomp/qryproc.c line 4
- in /usr/ingres/source/decomp/rangetable.c line 2
- in /usr/ingres/source/decomp/readq.c line 4
- in /usr/ingres/source/decomp/reduction.c line 4
- in /usr/ingres/source/decomp/reformat.c line 5
- in /usr/ingres/source/decomp/ret_unique.c line 4
- in /usr/ingres/source/decomp/rnum.c line 2
- in /usr/ingres/source/decomp/selectv.c line 4
- in /usr/ingres/source/decomp/setvar.c line 4
- in /usr/ingres/source/decomp/usubr.c line 5
- in /usr/ingres/source/decomp/writeback.c line 4
- in /usr/ingres/source/decomp/writenod.c line 5

Last modified: 1980-12-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1372 |