~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
 
66
66
  unsigned char *default_values;                /* row with default values */
67
 
  LEX_STRING comment;                   /* Comment about table */
68
67
  const CHARSET_INFO *table_charset; /* Default charset of string fields */
69
68
 
70
69
  MY_BITMAP all_set;
85
84
  LEX_STRING normalized_path;           /* unpack_filename(path) */
86
85
  LEX_STRING connect_string;
87
86
 
88
 
  uint32_t   avg_row_length;            /* create information */
89
87
  uint32_t   block_size;                   /* create information */
90
88
  uint32_t   version;
91
89
  uint32_t   timestamp_offset;          /* Set to offset+1 of record */
93
91
  uint32_t   stored_rec_length;         /* Stored record length*/
94
92
  enum row_type row_type;               /* How rows are stored */
95
93
 
96
 
  ha_rows min_rows;             /* create information */
97
 
  ha_rows max_rows;             /* create information */
 
94
private:
 
95
  /* Max rows is a hint to HEAP during a create tmp table */
 
96
  uint64_t max_rows;
 
97
 
 
98
  drizzled::message::Table *table_proto;
 
99
public:
 
100
 
 
101
  /* This is only used in one location currently */
 
102
  inline void setTableProto(drizzled::message::Table *arg)
 
103
  {
 
104
    assert(table_proto == NULL);
 
105
    table_proto= arg;
 
106
  }
 
107
 
 
108
  inline bool hasComment()
 
109
  {
 
110
    return (table_proto) ?  table_proto->options().has_comment() : false; 
 
111
  }
 
112
 
 
113
  inline const char *getComment()
 
114
  {
 
115
    return (table_proto) ?  table_proto->options().comment().c_str() : NULL; 
 
116
  }
 
117
 
 
118
  inline uint32_t getCommentLength()
 
119
  {
 
120
    return (table_proto) ? table_proto->options().comment().length() : 0; 
 
121
  }
 
122
 
 
123
  inline uint64_t getMaxRows()
 
124
  {
 
125
    return max_rows;
 
126
  }
 
127
 
 
128
  inline void setMaxRows(uint64_t arg)
 
129
  {
 
130
    max_rows= arg;
 
131
  }
98
132
 
99
133
  StorageEngine *storage_engine;                        /* storage engine plugin */
100
134
  inline StorageEngine *db_type() const /* table_type for handler */
292
326
 
293
327
    storage_engine= NULL;
294
328
 
 
329
    delete table_proto;
 
330
    table_proto= NULL;
 
331
 
295
332
    /* We must copy mem_root from share because share is allocated through it */
296
333
    memcpy(&new_mem_root, &mem_root, sizeof(new_mem_root));
297
334
    free_root(&new_mem_root, MYF(0));                 // Free's share