1: #
2: /*
3: ** This header file contains the external (global) declarations
4: ** of variables and structures as well as the manifest constants
5: ** particular to OVQP.
6: **
7: ** By convention global variable identifiers are spelled with
8: ** an initial capital letter; manifest constants are in caps
9: ** completely.
10: **
11: */
12:
13:
14:
15: /*
16: ** Manifest constants
17: */
18:
19:
20: # define tTFLAG 'O' /* trace flag */
21:
22: # define LBUFSIZE 850 /* buffer size for holding query list */
23: /* and concat and ascii buffers */
24: # define NSIMP 15 /*maximum no. of "simple clauses"
25: * allowed in Qual list
26: * (see "strategy" portion) */
27: # ifndef STACKSIZ
28: # define STACKSIZ 20 /* Stack size for interpreter */
29: # endif
30: # define MAXNODES (2 * MAXDOM) + 50 /* max nodes in Qvect */
31:
32: /* symbolic values for GETNXT parameter of fcn GET */
33: # define CURTUP 0 /* get tuple specified by tid */
34: # define NXTTUP 1 /* get next tuple after one specified by tid */
35:
36:
37: /* symbolic values for CHECKDUPS param of fcn INSERT */
38: # define DUPS 0 /* allow a duplicate tuple to be inserted */
39: # define NODUPS 1 /* check for and avoid inserting
40: * a duplicate (if possible)*/
41:
42:
43: # define TIDTYPE INT
44: # define TIDLEN 4
45:
46: # define CNTLEN 4 /* counter for aggregate computations */
47: # define CNTTYPE INT /* counter type */
48:
49: # define ANYLEN 2 /* length for opANY */
50: # define ANYTYPE INT /* type for opANY */
51:
52: /* error codes for errors caused by user query ie. not syserrs */
53:
54: # define LISTFULL 4100 /* postfix query list full */
55: # define BADCONV 4101 /* */
56: # define BADUOPC 4102 /* Unary operator not allowed on char fields */
57: # define BADMIX 4103 /* can't assign, compare or operate a numberic with a char */
58: # define BADSUMC 4104 /* can't sum char domains (aggregate) */
59: # define BADAVG 4105 /* can't avg char domains (aggregate) */
60: # define STACKOVER 4106 /* interpreter stack overflow */
61: # define CBUFULL 4107 /* not enough space for concat or ascii operation */
62: # define BADCHAR 4108 /* arithmetic operation on two character fields */
63: # define NUMERIC 4109 /* numeric field in a character operator */
64: # define FLOATEXCEP 4110 /* floating point exception */
65: # define CHARCONVERT 4111 /* bad ascii to numeric conversion */
66: # define NODOVFLOW 4112 /* node vector overflow */
67: # define BADSECINDX 4199 /* found a 6.0 sec index */
68:
69: # define cpderef(x) (*((char **)(x)))
70:
71: char Outtup[MAXTUP];
72: char Intup[MAXTUP];
73: char *Origtup;
74: long Intid;
75: long Uptid;
76:
77: int Ov_qmode; /* flag set to indicate mode of tuple disposition */
78: extern int Equel; /* equel flag set by initproc */
79:
80:
81:
82: int Bopen; /* TRUE if batch file is open */
83:
84: struct descriptor *Scanr, /* pts to desc of reln to be scanned,
85: * (i.e. either Srcdesc or Indesc) */
86: *Source, /* 0 if no source for qry, else points to Srcdesc */
87: *Result; /* 0 if no result for qry, else points to Reldesc */
88:
89:
90: long *Counter; /* cnts "gets" done in OVQP */
91: char *Tend; /* pts to end of data in Outtup */
92:
93: struct symbol **Tlist,
94: **Alist,
95: **Qlist,
96: **Bylist;
97:
98: int Newq; /* flags new user query to OVQP */
99: long Lotid, Hitid; /* lo & hi limits of scan in OVQP */
100:
101: struct stacksym
102: {
103: char type;
104: char len;
105: int value[4];
106: } Stack[STACKSIZ]; /* stack for OVQP interpreter */
107:
108:
109: int Buflag; /* flags a batch update situation (Ov_qmode != mdRETR) */
110: int Targvc; /* var count in Target list (flags constant Targ. list) */
111: int Qualvc; /* var count in Qual list */
112: int Userqry; /* flags a query on the users's result rel */
113: int Retrieve; /* true is a retrieve, else false */
114: int Diffrel; /* true is Source and Result are different */
115: int Agcount; /* count of the # of aggregates in the query */
116: long Tupsfound; /* counts # tuples which satified the query */
117: int R_decomp; /* file for reading info from decomp */
118: int W_decomp; /* file for writing to decomp */
119: struct symbol *Qvect [MAXNODES];
120: int Qvpointer;
Defined variables
Alist
defined in line
94; used 11 times
Bopen
defined in line
82; used 16 times
Bylist
defined in line
96; used 13 times
Hitid
defined in line
99; used 6 times
Intid
defined in line
74; used 4 times
Intup
defined in line
72; used 14 times
Lotid
defined in line
99; used 7 times
Newq
defined in line
98; used 6 times
Outtup
defined in line
71; used 18 times
- in /usr/ingres/source/decomp/call_ovqp70.c line
348
- in /usr/ingres/source/ovqp/interp.c line
161,
182-186(2)
- in /usr/ingres/source/ovqp/interp1.c line
148
- in /usr/ingres/source/ovqp/scan.c line
41-46(2),
101,
124,
176,
195,
201,
212,
256,
263,
272-277(2)
- in /usr/ingres/source/ovqp/support.c line
130
Qlist
defined in line
95; used 13 times
Result
defined in line
87; used 43 times
- in /usr/ingres/source/decomp/call_ovqp70.c line
110-112(2),
126-134(4)
- in /usr/ingres/source/ovqp/getqry.c line
57,
71,
78,
84-86(2),
96,
103
- in /usr/ingres/source/ovqp/interp.c line
154,
160-166(5),
180-186(3)
- in /usr/ingres/source/ovqp/scan.c line
38-41(3),
62,
98-99(2),
195-201(3),
212,
222-225(3),
236,
256,
272-283(6)
Scanr
defined in line
84; used 28 times
- in /usr/ingres/source/ovqp/key.c line
204,
211(2),
232-241(3),
341-342(3)
- in /usr/ingres/source/ovqp/scan.c line
32(2),
120,
138-154(5),
160-162(2)
- in /usr/ingres/source/ovqp/strategy.c line
41-43(2),
112,
150,
162,
191-198(4)
Source
defined in line
86; used 22 times
- in /usr/ingres/source/decomp/call_ovqp70.c line
115-117(2),
320
- in /usr/ingres/source/ovqp/getqry.c line
57,
66
- in /usr/ingres/source/ovqp/scan.c line
62,
146,
154,
161,
167,
220,
254
- in /usr/ingres/source/ovqp/strategy.c line
35(2),
41,
52-55(2),
86-91(3),
101-102(2)
Tend
defined in line
91; used 16 times
Tlist
defined in line
93; used 10 times
Uptid
defined in line
75; used 9 times
Defined struct's
Defined macros
DUPS
defined in line
38;
never used
NSIMP
defined in line
24; used 1 times
Usage of this include