107 lines
3.1 KiB
C
Executable File
107 lines
3.1 KiB
C
Executable File
/******************************************************************************
|
|
*
|
|
* Global variables for SDML
|
|
*
|
|
* Module %M% Version %I% Date %H%
|
|
*
|
|
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
|
|
* This is unpublished proprietary source code of Ardent Software Inc.
|
|
* The copyright notice above does not evidence any actual or intented
|
|
* publication of such source code.
|
|
*
|
|
*******************************************************************************
|
|
*
|
|
* Maintenence log - insert most recent change descriptions at top
|
|
*
|
|
* Date.... GTAR# WHO Description.........................................
|
|
* 10/14/98 23801 SAP Change copyrights.
|
|
* 01/25/96 17832 HSB Moved alter_fdesc into globals file.
|
|
* 12/05/95 17613 HSB Created from common global variables from sdml_misc split
|
|
* 12/06/95 17613 HSB Removed ANSI prototypes.
|
|
*****************************************************************************/
|
|
#ifdef SDML_GLOBAL
|
|
#define Ex
|
|
#define I(vals) = vals
|
|
#define SI(len, text) = {len, (text)}
|
|
|
|
Ex PUB_RO uchar TMtext[] = {TM};
|
|
Ex PUB_RO uchar VMtext[] = {VM};
|
|
#else
|
|
#define Ex EXTERN
|
|
#define I(vals)
|
|
#define SI(len, text)
|
|
|
|
Ex PUB_RO uchar TMtext[];
|
|
Ex PUB_RO uchar VMtext[];
|
|
#endif
|
|
|
|
Ex PUB_RO char _uvviews[] I("sql/catalog/UV_VIEWS");
|
|
Ex PUB_RO char _dot[] I(".");
|
|
Ex PUB_RO char _slash[] I("/");
|
|
Ex PUB_RO char _VOC[] I("VOC");
|
|
Ex PUB_RO char _binrm[] I("/bin/rm");
|
|
Ex PUB_RO char _rm[] I("rm");
|
|
Ex PUB_RO char _rf[] I("-rf");
|
|
Ex PUB_RO char _uvschema[] I("sql/catalog/UV_SCHEMA");
|
|
Ex PUB_RO char _uvusers[] I("sql/catalog/UV_USERS");
|
|
Ex PUB_RO char _uvcolumn[] I("sql/catalog/UV_COLUMNS");
|
|
Ex PUB_RO char _uvtables[] I("sql/catalog/UV_TABLES");
|
|
Ex PUB_RO char _CONM[] I("UVCON_");
|
|
Ex PUB_RW UVSICA *atb_oldperms I((UVSICA *)0);
|
|
Ex PUB_RO STRING _periodstr SI(1, (uchar *)_dot);
|
|
Ex PUB_RO STRING TMstr SI(1, (uchar *)TMtext);
|
|
Ex PUB_RO STRING VMstr SI(1, (uchar *)VMtext);
|
|
|
|
Ex PUB_RW char tmppath[512];
|
|
Ex PUB_RW DBFILE drop_fdesc;
|
|
Ex PUB_RW DBFILE uvtables_fdesc;
|
|
Ex PUB_RW DBFILE eval_fdesc;
|
|
Ex PUB_RW DBFILE ri_fdesc;
|
|
Ex PUB_RW DBFILE ok_fdesc;
|
|
Ex PUB_RW DBFILE sica_fdesc;
|
|
Ex PUB_RW DBFILE alter_fdesc;
|
|
Ex PUB_RW char *author_name;
|
|
Ex PUB_RW struct passwd *author;
|
|
Ex PUB_RW int author_priv;
|
|
Ex PUB_RW int explain I(0);
|
|
Ex PUB_RW unsigned short *ref_col_list;
|
|
|
|
#undef Ex
|
|
#undef I
|
|
#undef SI
|
|
|
|
#define READ_LOCK(rec, fdesc, key, status) \
|
|
while(1)\
|
|
{\
|
|
(rec) = DBReadLock((fdesc), (key), &(status), (GROUP_READ_LATCH|LOCK_RU),\
|
|
LOCK_NOWAIT);\
|
|
if (((status) & 0x7) == 3)\
|
|
sleep(1);\
|
|
else\
|
|
break;\
|
|
}
|
|
|
|
#define READ_SICA(fd,sz,sica) \
|
|
sica = DBreadSICA(fd, sz); \
|
|
if (sica == (UVSICAREGION*)0) \
|
|
{ \
|
|
DBclose(fd); \
|
|
warning(950317); \
|
|
sdml_clup(); \
|
|
}
|
|
|
|
STRING lockuvtables();
|
|
char *get_schema();
|
|
int check_schema();
|
|
void drop_schema();
|
|
void add_schema_name();
|
|
void add_schema_auth();
|
|
void add_schema_path();
|
|
void mkdtlst();
|
|
void frdtlst();
|
|
int doing_create_schema();
|
|
void set_rowunique();
|
|
void add_assoc_col();
|
|
void add_ref_col();
|
|
void add_ref_cons();
|