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

##### Variables

    Accanon           X
    Accerror          X
    Acctuple          X

##### Macros

    AMATTR_ERR        X
    AMCLOSE_ERR       X
    AMFIND_ERR        X
    AMINVL_ERR        X
    AMNOATTS_ERR      X
    AMNOFILE_ERR      X
    AMOPNVIEW_ERR     X
    AMREAD_ERR        X
    AMREL_ERR         X
    AMWRITE_ERR       X
    A_DBCONCUR        X
    A_NEWFMT          X
    A_QRYMOD          X
    BUF_DIRECT        X
    BUF_DIRTY         X
    BUF_LOCKED        X
    MAXTUPS           X
    M_BTREE           X
    M_HASH            X
    M_HEAP            X
    M_ISAM            X
    M_TRUNC           X
    NACCBUFS          X
    PGPTRSIZ          X
    PGSIZE            X

##### struct's

    accbuf            X
    admin             X
    adminhdr          X
    pgtuple           X
    raw_accbuf        X

       1: #
       2: /*
       3: **  ACCESS.H -- definitions relating to the access methods.
       4: **
       5: **	Version:
       6: **		@(#)access.h	1.5	8/24/80
       7: */
       8:
       9: # ifndef PGSIZE
      10:
      11:
      12: # define    PGSIZE      512     /* size of page */
      13: # define    PGPTRSIZ    4       /* size of a tid */
      14: # define    MAXTUPS     100     /* maximum number of tups */
      15:
      16: /* storage structure flags; < 0 means compressed */
      17: # define    M_HEAP      5       /* paged heap */
      18: # define    M_ISAM      11      /* indexed sequential */
      19: # define    M_HASH      21      /* random hash */
      20: # define    M_BTREE     31      /* BTREES */
      21: # define    M_TRUNC     99      /* internal pseudo-mode: truncated */
      22:
      23: # define    NACCBUFS    3       /* number of access method buffers */
      24:
      25: /* error flags */
      26: # define    AMREAD_ERR  -1
      27: # define    AMWRITE_ERR -2
      28: # define    AMNOFILE_ERR    -3  /* can't open file for a relation */
      29: # define    AMREL_ERR   -4  /* can't open relation relation */
      30: # define    AMATTR_ERR  -5  /* can't open attribute relation */
      31: # define    AMNOATTS_ERR    -6  /* attribute missing or xtra in att-rel */
      32: # define    AMCLOSE_ERR -7  /* can't close relation */
      33: # define    AMFIND_ERR  -8  /* unidentifiable stora  Petructure in find */
      34: # define    AMINVL_ERR  -9  /* invalid TID */
      35: # define    AMOPNVIEW_ERR   -10 /* attempt to open a view for rd or wr */
      36:
      37: /* the following is the access methods buffer */
      38: struct accbuf
      39: {
      40:     /* this stuff is actually stored in the relation */
      41:     long        mainpg;     /* next main page (0 - eof) */
      42:     long        ovflopg;    /* next ovflo page (0 - none) */
      43:     short       nxtlino;    /* next avail line no for this page */
      44:     char        firstup[PGSIZE - 12];   /* tuple space */
      45:     short       linetab[1]; /* line table at end of buffer - grows down */
      46:                     /* linetab[lineno] is offset into
      47: 					** the buffer for that line; linetab[nxtlino]
      48: 					** is free space pointer */
      49:
      50:     /* this stuff is not stored in the relation */
      51:     long        rel_tupid;  /* unique relation id */
      52:     long        thispage;   /* page number of the current page */
      53:     int     filedesc;   /* file descriptor for this reln */
      54:     struct accbuf   *modf;      /* use time link list forward pointer */
      55:     struct accbuf   *modb;      /* back pointer */
      56:     int     bufstatus;  /* various bits defined below */
      57: };
      58:
      59: /* The following assignments are status bits for accbuf.bufstatus */
      60: # define    BUF_DIRTY   001 /* page has been changed */
      61: # define    BUF_LOCKED  002 /* page has a page lock on it */
      62: # define    BUF_DIRECT  004 /* this is a page from isam direct */
      63:
      64: /* access method buffer typed differently for various internal operations */
      65: struct raw_accbuf
      66: {
      67:     char    acc_buf[NACCBUFS];
      68: };
      69:
      70: /* pointers to maintain the buffer */
      71: extern struct accbuf    *Acc_head;  /* head of the LRU list */
      72: extern struct accbuf    *Acc_tail;  /* tail of the LRU list */
      73: extern struct accbuf    Acc_buf[NACCBUFS];  /* the buffers themselves */
      74:
      75:
      76: /*
      77: **  ADMIN file struct
      78: **
      79: **	The ADMIN struct describes the initial part of the ADMIN file
      80: **	which exists in each database.  This file is used to initially
      81: **	create the database, to maintain some information about the
      82: **	database, and to access the RELATION and ATTRIBUTE relations
      83: **	on OPENR calls.
      84: */
      85:
      86: struct adminhdr
      87: {
      88:     char    adowner[2]; /* user code of data base owner */
      89:     short   adflags;    /* database flags */
      90: };
      91:
      92: struct admin
      93: {
      94:     struct adminhdr     adhdr;
      95:     struct descriptor   adreld;
      96:     struct descriptor   adattd;
      97: };
      98:
      99: /*
     100: **  Admin status bits
     101: **
     102: **	These bits define the status of the database.  They are
     103: **	contained in the adflags field of the admin struct.
     104: */
     105:
     106: # define    A_DBCONCUR  0000001     /* set database concurrency */
     107: # define    A_QRYMOD    0000002     /* database uses query modification */
     108: # define    A_NEWFMT    0000004     /* database is post-6.2 */
     109:
     110:
     111: /* following is buffer space for data from admin file */
     112: extern struct admin     Admin;
     113:
     114: /*
     115: **  PGTUPLE -- btree index key (a tid and an index key)
     116: */
     117:
     118: struct pgtuple
     119: {
     120:     struct tup_id   childtid;       /* the pointer comes before */
     121:     char        childtup[MAXTUP];
     122: };
     123:
     124: /*
     125: ** global counters for the number of UNIX read and write
     126: **  requests issued by the access methods.
     127: */
     128:
     129: extern long Accuread, Accuwrite;
     130:
     131: /*
     132: **	Global values used by everything
     133: */
     134:
     135: char        *Acctuple;      /* pointer to canonical tuple */
     136: int     Accerror;       /* error no for fatal errors */
     137: char        Accanon[MAXTUP];    /* canonical tuple buffer */
     138:
     139: # endif PGSIZE

#### Defined variables

Accanon defined in line 137; used 3 times

- in /usr/ingres/source/access/put_tuple.c line 70, 103, 140

Accerror defined in line 136; used 3 times

- in /usr/ingres/source/access/page.c line 165-169(3)

Acctuple defined in line 135; used 5 times

- in /usr/ingres/source/access/insert.c line 54
- in /usr/ingres/source/access/put_tuple.c line 70-74(2)
- in /usr/ingres/source/access/replace.c line 177
- in /usr/ingres/source/dbu/modify.c line 763

#### Defined struct's

accbuf defined in line 38; used 90 times

- in line 54-55(4), 71-73(6)
- in /usr/ingres/source/access/acc_addbuf.c line 9-12(4)
- in /usr/ingres/source/access/accbuf.c line 12-14(6), 33(2), 41(2), 70-71(4), 121-123(4), 156(2), 188(2), 200-202(4)
- in /usr/ingres/source/access/add_ovflo.c line 17-22(4)
- in /usr/ingres/source/access/add_prim.c line 18(2)
- in /usr/ingres/source/access/closer.c line 24(2)
- in /usr/ingres/source/access/findbest.c line 148(2)
- in /usr/ingres/source/access/formatpg.c line 8(2)
- in /usr/ingres/source/access/last_page.c line 12-16(4)
- in /usr/ingres/source/access/noclose.c line 24(2)
- in /usr/ingres/source/access/page.c line 22-25(6), 88-90(4)
- in /usr/ingres/source/access/put_tuple.c line 145(2), 155(2)
- in /usr/ingres/source/dbu/ksort.c line 530(2), 540(2), 574(2)
- in /usr/ingres/source/dbu/modify.c line 792(2)
- in /usr/ingres/source/decomp/call_ovqp70.c line 399(2)
- in /usr/ingres/source/iutil/pglocks.c line 10-12(4), 38-40(4)

admin defined in line 92; used 16 times

- in line 112(2)
- in /usr/ingres/source/access/accbuf.c line 21(2)
- in /usr/ingres/source/dbu/rmqm.c line 99(2)
- in /usr/ingres/source/qrymod/d_prot.c line 97(2)
- in /usr/ingres/source/support/creatdb.c line 248(2)
- in /usr/ingres/source/support/destroydb.c line 34(2)
- in /usr/ingres/source/support/ingres.c line 185(2)
- in /usr/ingres/source/support/subs.c line 162(2)

adminhdr defined in line 86; used 2 times

- in line 94(2)

pgtuple defined in line 118; never used
raw_accbuf defined in line 65; used 6 times

- in /usr/ingres/source/access/del_tuple.c line 31(2)
- in /usr/ingres/source/access/get_tuple.c line 87(2)
- in /usr/ingres/source/dbu/modify.c line 893(2)

#### Defined macros

AMATTR_ERR defined in line 30; never used
AMCLOSE_ERR defined in line 32; used 2 times

- in /usr/ingres/source/access/closer.c line 40
- in /usr/ingres/source/access/inpcloser.c line 38

AMFIND_ERR defined in line 33; used 1 times

- in /usr/ingres/source/access/find.c line 146

AMINVL_ERR defined in line 34; used 2 times

- in /usr/ingres/source/access/get_tuple.c line 160
- in /usr/ingres/source/dbu/modify.c line 851

AMNOATTS_ERR defined in line 31; used 1 times

- in /usr/ingres/source/access/openr.c line 266

AMNOFILE_ERR defined in line 28; used 1 times

- in /usr/ingres/source/access/openr.c line 133

AMOPNVIEW_ERR defined in line 35; used 5 times

- in /usr/ingres/source/access/openr.c line 128
- in /usr/ingres/source/dbu/copy.c line 115
- in /usr/ingres/source/dbu/index.c line 59
- in /usr/ingres/source/dbu/modify.c line 118
- in /usr/ingres/source/dbu/print.c line 73

AMREAD_ERR defined in line 26; used 2 times

- in /usr/ingres/source/access/page.c line 70
- in /usr/ingres/source/dbu/ksort.c line 566

AMREL_ERR defined in line 29; never used
AMWRITE_ERR defined in line 27; used 1 times

- in /usr/ingres/source/access/page.c line 151

A_DBCONCUR defined in line 106; used 3 times

- in /usr/ingres/source/access/accbuf.c line 104
- in /usr/ingres/source/iutil/initucode.c line 630
- in /usr/ingres/source/support/creatdb.c line 613

A_NEWFMT defined in line 108; used 1 times

- in /usr/ingres/source/iutil/initucode.c line 550

A_QRYMOD defined in line 107; used 7 times

- in /usr/ingres/source/dbu/create.c line 248
- in /usr/ingres/source/dbu/rmqm.c line 109
- in /usr/ingres/source/parser/main.c line 68(2)
- in /usr/ingres/source/support/ingres.c line 288
- in /usr/ingres/source/support/subs.c line 226(2)

BUF_DIRECT defined in line 62; used 3 times

- in /usr/ingres/source/access/findbest.c line 161
- in /usr/ingres/source/access/ndxsearch.c line 99
- in /usr/ingres/source/dbu/modify.c line 831

BUF_DIRTY defined in line 60; used 10 times

- in /usr/ingres/source/access/add_ovflo.c line 67, 83
- in /usr/ingres/source/access/add_prim.c line 23, 36
- in /usr/ingres/source/access/del_tuple.c line 48
- in /usr/ingres/source/access/page.c line 109, 131
- in /usr/ingres/source/access/put_tuple.c line 37
- in /usr/ingres/source/dbu/modify.c line 831, 889

BUF_LOCKED defined in line 61; used 5 times

- in /usr/ingres/source/access/page.c line 41, 57, 145
- in /usr/ingres/source/iutil/pglocks.c line 31, 57

MAXTUPS defined in line 14; never used
M_BTREE defined in line 20; never used
M_HASH defined in line 19; used 5 times

- in /usr/ingres/source/dbu/modify.c line 66-67(2), 544, 597, 689

M_HEAP defined in line 17; used 18 times

- in /usr/ingres/source/access/add_ovflo.c line 92
- in /usr/ingres/source/access/findbest.c line 49, 154
- in /usr/ingres/source/access/last_page.c line 23
- in /usr/ingres/source/access/readadmin.c line 140, 146
- in /usr/ingres/source/access/replace.c line 73
- in /usr/ingres/source/dbu/create.c line 645
- in /usr/ingres/source/dbu/index.c line 190
- in /usr/ingres/source/dbu/modify.c line 64-71(4), 172, 214
- in /usr/ingres/source/dbu/resetrel.c line 36
- in /usr/ingres/source/decomp/reformat.c line 485
- in /usr/ingres/source/support/creatdb.c line 1134

M_ISAM defined in line 18; used 7 times

- in /usr/ingres/source/dbu/modify.c line 68-69(2), 222, 370, 661, 717, 771

M_TRUNC defined in line 21; used 3 times

- in /usr/ingres/source/dbu/modify.c line 72, 171, 218

NACCBUFS defined in line 23; used 4 times

- in line 67, 73
- in /usr/ingres/source/access/accbuf.c line 12, 82

PGPTRSIZ defined in line 13; never used
PGSIZE defined in line 12; used 19 times

- in line 9, 44
- in /usr/ingres/source/access/formatpg.c line 26-30(4)
- in /usr/ingres/source/access/last_page.c line 37
- in /usr/ingres/source/access/page.c line 66-67(3), 132-133(3)
- in /usr/ingres/source/access/put_tuple.c line 161
- in /usr/ingres/source/dbu/ksort.c line 563-564(3)
- in /usr/ingres/source/decomp/reformat.c line 598
- in /usr/ingres/source/decomp/usubr.c line 247

#### Usage of this include

access.h used 75 times

- in /usr/ingres/source/access/acc_addbuf.c line 2
- in /usr/ingres/source/access/accbuf.c line 2
- in /usr/ingres/source/access/add_ovflo.c line 2
- in /usr/ingres/source/access/add_prim.c line 2
- in /usr/ingres/source/access/batch.c line 5
- in /usr/ingres/source/access/batchxtra.c line 4
- in /usr/ingres/source/access/catalog_desc.c line 3
- in /usr/ingres/source/access/cleanrel.c line 3
- in /usr/ingres/source/access/closecatalog.c line 3
- in /usr/ingres/source/access/closer.c line 2
- in /usr/ingres/source/access/compare.c line 2
- in /usr/ingres/source/access/del_tuple.c line 2
- in /usr/ingres/source/access/delete.c line 2
- in /usr/ingres/source/access/find.c line 4
- in /usr/ingres/source/access/findbest.c line 3
- in /usr/ingres/source/access/formatpg.c line 2
- in /usr/ingres/source/access/get.c line 3
- in /usr/ingres/source/access/get_tuple.c line 2
- in /usr/ingres/source/access/getequal.c line 2
- in /usr/ingres/source/access/inpcloser.c line 2
- in /usr/ingres/source/access/insert.c line 2
- in /usr/ingres/source/access/last_page.c line 2
- in /usr/ingres/source/access/ndxsearch.c line 42
- in /usr/ingres/source/access/newlino.c line 2
- in /usr/ingres/source/access/noclose.c line 3
- in /usr/ingres/source/access/opencatalog.c line 4
- in /usr/ingres/source/access/openr.c line 3
- in /usr/ingres/source/access/page.c line 2
- in /usr/ingres/source/access/put_tuple.c line 3
- in /usr/ingres/source/access/readadmin.c line 2
- in /usr/ingres/source/access/replace.c line 2
- in /usr/ingres/source/access/rhash.c line 4
- in /usr/ingres/source/access/scan_dups.c line 3
- in /usr/ingres/source/access/tup_len.c line 2
- in /usr/ingres/source/access/utility.c line 2
- in /usr/ingres/source/access/writebatch.c line 4
- in /usr/ingres/source/dbu/copy.c line 5
- in /usr/ingres/source/dbu/create.c line 2
- in /usr/ingres/source/dbu/display.c line 27
- in /usr/ingres/source/dbu/get_seq_atts.c line 2
- in /usr/ingres/source/dbu/help.c line 4
- in /usr/ingres/source/dbu/index.c line 4
- in /usr/ingres/source/dbu/ksort.c line 6
- in /usr/ingres/source/dbu/main.c line 5
- in /usr/ingres/source/dbu/modify.c line 5
- in /usr/ingres/source/dbu/modupdate.c line 13
- in /usr/ingres/source/dbu/print.c line 2
- in /usr/ingres/source/dbu/rdwrbatch.c line 4
- in /usr/ingres/source/dbu/resetrel.c line 4
- in /usr/ingres/source/dbu/rmqm.c line 47
- in /usr/ingres/source/dbu/secupdate.c line 5
- in /usr/ingres/source/dbu/update.c line 4
- in /usr/ingres/source/decomp/call_dbu70.c line 6
- in /usr/ingres/source/decomp/call_ovqp70.c line 4
- in /usr/ingres/source/decomp/reformat.c line 6
- in /usr/ingres/source/decomp/usubr.c line 4
- in /usr/ingres/source/iutil/clr_tuple.c line 3
- in /usr/ingres/source/iutil/cslocks.c line 2
- in /usr/ingres/source/iutil/initucode.c line 6
- in /usr/ingres/source/iutil/paramd.c line 4
- in /usr/ingres/source/iutil/pglocks.c line 2
- in /usr/ingres/source/iutil/printup.c line 5
- in /usr/ingres/source/ovqp/interp.c line 5
- in /usr/ingres/source/parser/main.c line 6
- in /usr/ingres/source/qrymod/catalog_desc.c line 3
- in /usr/ingres/source/qrymod/d_prot.c line 5
- in /usr/ingres/source/qrymod/integrity.c line 4
- in /usr/ingres/source/support/creatdb.c line 5
- in /usr/ingres/source/support/destroydb.c line 7
- in /usr/ingres/source/support/helpr.c line 5
- in /usr/ingres/source/support/ingres.c line 8
- in /usr/ingres/source/support/printr.c line 5
- in /usr/ingres/source/support/restore.c line 8
- in /usr/ingres/source/support/subs.c line 7
- in /usr/ingres/source/support/sysmod.c line 4

Last modified: 1995-02-12 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1475 |