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
Newr
defined in line
54; used 8 times
Qbuf
defined in line
90; used 10 times
Qle
defined in line
91; used 7 times
Qmode
defined in line
50; used 3 times
R_dbu
defined in line
57; used 3 times
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
W_dbu
defined in line
58; used 5 times
W_ovqp
defined in line
56; used 12 times
Defined struct's
Defined macros
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)
OVHDM
defined in line
14; used 2 times
OVHDP
defined in line
13; used 3 times
SQSIZ
defined in line
23; used 2 times
Usage of this include