~jaypipes/drizzle/replication-to-transaction

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Brian Aker
  • Date: 2010-03-09 22:58:27 UTC
  • mfrom: (1320.1.18 build)
  • Revision ID: brian@gaz-20100309225827-7igxztca4lrj3fx3
Merge in show status work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
  LEX_STRING path;      /* Path to table (from datadir) */
200
200
  LEX_STRING normalized_path;           /* unpack_filename(path) */
201
201
 
 
202
  const char *getTableName() const
 
203
  {
 
204
    return table_name.str;
 
205
  }
 
206
 
 
207
  const char *getSchemaName() const
 
208
  {
 
209
    return db.str;
 
210
  }
 
211
 
202
212
  uint32_t   block_size;                   /* create information */
203
213
  uint64_t   version;
204
214
  uint32_t   timestamp_offset;          /* Set to offset+1 of record */
206
216
  uint32_t   stored_rec_length;         /* Stored record length*/
207
217
  enum row_type row_type;               /* How rows are stored */
208
218
 
 
219
  uint32_t getRecordLength()
 
220
  {
 
221
    return reclength;
 
222
  }
 
223
 
209
224
private:
210
225
  /* Max rows is a hint to HEAP during a create tmp table */
211
226
  uint64_t max_rows;
213
228
  message::Table *table_proto;
214
229
public:
215
230
 
 
231
  const char * getTableTypeAsString() const
 
232
  {
 
233
    switch (table_proto->type())
 
234
    {
 
235
    default:
 
236
    case message::Table::STANDARD:
 
237
      return "STANDARD";
 
238
    case message::Table::TEMPORARY:
 
239
      return "TEMPORARY";
 
240
    case message::Table::INTERNAL:
 
241
      return "INTERNAL";
 
242
    case message::Table::FUNCTION:
 
243
      return "FUNCTION";
 
244
    }
 
245
  }
 
246
 
216
247
  /* This is only used in one location currently */
217
 
  inline message::Table * getTableProto()
 
248
  inline message::Table *getTableProto() const
218
249
  {
219
250
    return table_proto;
220
251
  }