~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: Brian Aker
  • Date: 2008-08-15 15:01:59 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080815150159-vpx04493xvokzrkv
First pass in encapsulating table (it is now an object, no longer a structure).

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
  uint column_bitmap_size;
260
260
  uchar frm_version;
261
261
  bool null_field_first;
262
 
  bool system;                          /* Set if system table (one record) */
263
262
  bool db_low_byte_first;               /* Portable row format */
264
263
  bool crashed;
265
264
  bool name_lock, replace_with_name_lock;
350
349
  INDEX_HINT_FORCE
351
350
};
352
351
 
353
 
struct st_table {
354
 
  st_table() {}                               /* Remove gcc warning */
355
 
 
 
352
class Table {
 
353
public:
356
354
  TABLE_SHARE   *s;
 
355
  Table() {}                               /* Remove gcc warning */
 
356
 
 
357
  inline TABLE_SHARE *getShare() { return s; } /* Get rid of this long term */
 
358
  inline void setShare(TABLE_SHARE *new_share) { s= new_share; } /* Get rid of this long term */
 
359
  inline uint sizeKeys() { return s->keys; }
 
360
  inline uint sizeFields() { return s->fields; }
 
361
  inline uint getRecordLength() { return s->reclength; }
 
362
  inline uint sizeBlobFields() { return s->blob_fields; }
 
363
  inline uint *getBlobField() { return s->blob_field; }
 
364
  inline uint getNullBytes() { return s->null_bytes; }
 
365
  inline uint getNullFields() { return s->null_fields; }
 
366
  inline unsigned char *getDefaultValues() { return s->default_values; }
 
367
 
 
368
  inline bool isNullFieldFirst() { return s->null_field_first; }
 
369
  inline bool isDatabaseLowByteFirst() { return s->db_low_byte_first; }         /* Portable row format */
 
370
  inline bool isCrashed() { return s->crashed; }
 
371
  inline bool isNameLock() { return s->name_lock; } 
 
372
  inline bool isReplaceWithNameLock() { return s->replace_with_name_lock; }
 
373
  inline bool isWaitingOnCondition() { return s->waiting_on_cond; }                 /* Protection against free */
 
374
 
357
375
  handler       *file;
358
 
  struct st_table *next, *prev;
 
376
  Table *next, *prev;
359
377
 
360
378
  THD   *in_use;                        /* Which thread uses this */
361
379
  Field **field;                        /* Pointer to fields */