1: # include <tree.h>
2: # include <func.h>
3: # include <access.h>
4: # include "../decomp/decomp.h"
5: # include "../ovqp/ovqp.h"
6:
7: /* @(#)globs.h 8.1 12/31/84 */
8:
9:
10: struct agglist
11: {
12: QTREE **father; /* addr of pointer to you */
13: QTREE *agpoint; /* pointer to aghead */
14: QTREE *agfather; /* is your father an aggregate? */
15: short agvarno; /* var # assigned to aggr fnct */
16: };
17:
18: struct hitlist
19: {
20: QTREE **trepr; /* position in tree to be changed */
21: short byno; /* by-list position */
22: };
23:
24: struct rang_tab
25: {
26: int relnum; /* internal decomp relation number */
27: int rtspec; /* relspec of relation */
28: int rtstat; /* relstat of relation */
29: int rtwid; /* relwidth of relation */
30: long rtcnt; /* tupcount of relation */
31: int rtaltnum; /* reserved for distributed decomp */
32: char *rtattmap; /* reserved for distributed decomp */
33: long rtdcnt; /* reserved for distributed decomp */
34: struct d_range *rtsrange; /* reserved for distributed decomp */
35: };
36:
37:
38: /* The following structure reserved for distributed decomp */
39: /* The order of this has been changed for proper alignment */
40: struct d_range
41: {
42: int relnum;
43: int draltnum;
44: long drtupcnt;
45: struct d_range *drnext;
46: int drstat;
47: char drsite[2];
48: };
49:
50:
51: /* structure used by reduction to maintain component pieces */
52: struct complist
53: {
54: struct complist *nextcomp; /* next comp piece */
55: struct complist *linkcomp; /* next clause of this comp */
56: QTREE *clause; /* associated clause */
57: int bitmap; /* map of all assoc clauses */
58: };
59:
60: bool Batchupd;
61:
62: struct desc_tab
63: {
64: int relnum; /* relation number */
65: char dtmode; /* status of descriptor */
66: char dtpos; /* position of last access */
67: DESC desc; /* descriptor */
68: };
69:
70:
71: struct stacksym
72: {
73: char s_type;
74: char s_len;
75: long s_value[2];
76: }; /* stack for OVQP interpreter */
77:
78:
79: struct simp
80: {
81: int relop; /* value of relop in simp clause*/
82: int att; /* attno of attribute */
83: SYMBOL *const; /* pointer to constant value symbol */
84: };
85:
86:
87: struct key
88: {
89: SYMBOL *keysym;
90: int dnumber;
91: };
92:
93: extern int Equel;
94:
95: struct
96: {
97: /* OVQP variables */
98: char ov_outtup[MAXTUP];
99: char ov_intup[MAXTUP];
100: char *ov_origtup;
101: char *ov_tend; /* pts to end of data in ov_outtup */
102: short ov_bopen; /* TRUE if batch file is open */
103: short ov_targvc; /* var count in Target list (flags constant Targ. list) */
104: short ov_qualvc; /* var count in Qual list */
105: short ov_userqry; /* flags a query on the users's result rel */
106: short ov_retrieve; /* true is a retrieve, else false */
107: char *ov_ovqpbuf;
108: short ov_diffrel; /* true is ov_source and ov_result are different */
109: short ov_agcount; /* count of the # of aggregates in the query */
110: short ov_qvpointer;
111: long ov_intid;
112: long ov_uptid;
113: long *ov_counter; /* cnts "gets" done in OVQP */
114: long ov_lotid;
115: long ov_hitid; /* lo & hi limits of scan in OVQP */
116: long ov_tupsfound; /* counts # tuples which satified the query */
117: DESC *ov_scanr; /* pts to desc of reln to be scanned */
118: DESC *ov_source; /* 0 if no source for qry, else poshorts to ov_srcdesc */
119: DESC *ov_result; /* 0 if no result for qry, else poshorts to ov_reldesc */
120: SYMBOL **ov_tlist; /* Target LIST */
121: SYMBOL **ov_alist; /* Aggregate LIST */
122: SYMBOL **ov_qlist; /* Query List */
123: SYMBOL **ov_bylist; /* By List */
124: struct stacksym ov_stack[STACKSIZ];
125: char ov_keyl[MAXTUP];
126: char ov_keyh[MAXTUP];
127: int ov_nsimp; /* Current no. entries in ov_simp vector */
128: int ov_fmode; /* find-mode determined by strategy */
129: struct simp ov_simp[NSIMP];
130: struct key ov_lkey_struct[MAXDOM+1];
131: struct key ov_hkey_struct[MAXDOM+1];
132:
133: /* DECOMP/OVQP variables */
134:
135: struct agglist *de_aggnext; /* next in aggregate list */
136: struct agglist *de_agglim; /* limit in aggregate list */
137: struct hitlist *de_hnext;
138: struct hitlist *de_hlimit;
139: char de_d_dbu70;
140: char de_d_ovqp70;
141: int de_synconly;
142: int de_error_flag;
143: int de_qvptr; /* index into available de_qvect space in ovqpnod() */
144: SYMBOL *de_qvect[MAXNODES];
145: short de_newq; /* OVPQ must devise new strategy */
146: short de_newr; /* force OVQP to reopen result relation */
147: int de_qmode; /* flag set to indicate mode of tuple disposition */
148: int de_resultvar; /* if >= 0 result variable */
149: int de_sourcevar; /* likewise for source variable */
150: char *de_qbuf; /* pointer to query buffer */
151:
152:
153:
154: QTREE *de_qle; /* ptr to QLEND node */
155: QTREE *de_tr; /* ptr to TREE node */
156: int de_dfiles; /* number of available file descriptors */
157: int de_dopnfiles; /* Number of open file descriptors */
158: struct desc_tab de_desc[MAXRELN]; /* descriptors available for use */
159: struct rang_tab de_rangev[MAXRANGE+2]; /* global range table with extra slot for FREEVAR and SECINDVAR */
160: int de_qry_mode; /* mode of original query (not nec same as de_qmode) */
161: char de_name_table[FIRSTNUM-1][MAXNAME];
162: char de_num_used[LASTNUM+1];
163: char de_buflag;
164: } De;
165:
166: short tTdecomp[100];
167: # ifdef tTf
168: # undef tTf
169: # endif tTf
170: # define tTf(a, b) ((b < 0) ? tTdecomp[a] : (tTdecomp[a] & (1 << b)))
Defined variables
Defined struct's
desc_tab
defined in line
62; used 62 times
- in line 158(2)
- in /usr/ingres/source/decomp/openrs.c line
65(2),
127(2),
158-162(4),
202-206(6),
234-235(4),
256(2),
277-278(4),
294-296(6),
311-315(4),
387-393(6),
445-447(4),
465-467(4),
487-492(6),
506-509(4),
523(2)
key
defined in line
87; used 30 times
simp
defined in line
79; used 14 times
Defined macros
tTf
defined in line
170; used 162 times
- in line 167-168(2)
- in /usr/ingres/source/decomp/ageval.c line
54,
166
- in /usr/ingres/source/decomp/aggregate.c line
85,
92,
194,
218,
312,
370,
445,
487,
511,
536,
576,
621
- in /usr/ingres/source/decomp/byeval.c line
79,
109,
123,
162,
213,
228,
296
- in /usr/ingres/source/decomp/call_dbu.c line
33
- in /usr/ingres/source/decomp/call_ovqp.c line
61-65(3),
75,
318
- in /usr/ingres/source/decomp/decision.c line
68,
86,
94,
127,
134,
151,
196,
439,
451
- in /usr/ingres/source/decomp/decomp.c line
59-61(2),
182,
200,
218,
270
- in /usr/ingres/source/decomp/exec_sq.c line
50,
61,
67,
118
- in /usr/ingres/source/decomp/makenode.c line
59,
78,
155
- in /usr/ingres/source/decomp/openrs.c line
105,
168,
182,
212,
404,
418
- in /usr/ingres/source/decomp/pull_sq.c line
38,
74,
80,
89,
98,
126,
140,
146,
183,
220,
229,
261,
270
- in /usr/ingres/source/decomp/qryproc.c line
47,
68,
147
- in /usr/ingres/source/decomp/rangetable.c line
116
- in /usr/ingres/source/decomp/reduction.c line
197
- in /usr/ingres/source/decomp/reformat.c line
66,
79,
87,
96,
132,
166,
214,
222,
265,
280,
303,
312,
378,
465,
596
- in /usr/ingres/source/decomp/selectv.c line
127,
187
- in /usr/ingres/source/decomp/setvar.c line
47
- in /usr/ingres/source/decomp/usubr.c line
120
- in /usr/ingres/source/ovqp/equelpr.c line
44,
67
- in /usr/ingres/source/ovqp/findsimps.c line
47,
149,
235,
369
- in /usr/ingres/source/ovqp/interp.c line
63,
79
- in /usr/ingres/source/ovqp/interp1.c line
51,
185,
244,
284
- in /usr/ingres/source/ovqp/key.c line
37,
59,
78,
108,
175,
207,
234,
245,
253,
275,
327,
338,
402
- in /usr/ingres/source/ovqp/scan.c line
34-38(2),
169,
196,
287-293(4)
- in /usr/ingres/source/ovqp/strategy.c line
45,
123,
234,
288,
320
- in /usr/ingres/source/ovqp/string.c line
67,
190,
243,
276,
293,
300,
320,
328,
364,
435,
504,
620,
688,
723,
896,
968,
1071,
1226
- in /usr/ingres/source/ovqp/tidtest.c line
40,
111
- in /usr/ingres/source/ovqp/typecheck.c line
148,
159,
174,
185,
199,
213,
226,
237,
250,
261
Usage of this include