1: # include   "../ingres.h"
   2: # include   "../access.h"
   3: 
   4: /*
   5: **	Delete - delete the tuple specified by tid
   6: **
   7: **	Delete removes the tuple specified by tid
   8: **	and reclaims the tuple space.
   9: **
  10: **	returns:
  11: **		<0  fatal error
  12: **		0   success
  13: **		2   tuple specified by tid aleady deleted
  14: */
  15: 
  16: 
  17: 
  18: delete(dx, tidx)
  19: struct descriptor   *dx;
  20: struct tup_id       *tidx;
  21: {
  22:     register struct descriptor  *d;
  23:     register struct tup_id      *tid;
  24:     register int            i;
  25: 
  26:     d = dx;
  27:     tid = tidx;
  28: 
  29: #	ifdef xATR1
  30:     if (tTf(91, 0))
  31:     {
  32:         printf("delete: %.14s,", d->relid);
  33:         dumptid(tid);
  34:     }
  35: #	endif
  36: 
  37:     if (i = get_page(d, tid))
  38:         return (i);
  39: 
  40:     if (i = invalid(tid))
  41:         return (i);
  42: 
  43:     i = tup_len(tid);
  44: 
  45:     del_tuple(tid, i);
  46:     d->reladds--;
  47: 
  48:     return (0);
  49: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2035
Valid CSS Valid XHTML 1.0 Strict