~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Brian Aker
  • Date: 2010-03-15 21:50:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1343.
  • Revision ID: brian@gaz-20100315215005-oqoblpbll9n0albj
Merge of table cache/def DD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
namespace drizzled
37
37
{
38
38
 
 
39
typedef drizzled::hash_map<std::string, TableShare *> TableDefinitionCache;
 
40
 
39
41
class TableShare
40
42
{
41
43
public:
210
212
  }
211
213
 
212
214
  uint32_t   block_size;                   /* create information */
 
215
 
213
216
  uint64_t   version;
 
217
  uint64_t getVersion()
 
218
  {
 
219
    return version;
 
220
  }
 
221
 
214
222
  uint32_t   timestamp_offset;          /* Set to offset+1 of record */
215
223
  uint32_t   reclength;                 /* Recordlength */
216
224
  uint32_t   stored_rec_length;         /* Stored record length*/
309
317
  enum tmp_table_type tmp_table;
310
318
 
311
319
  uint32_t ref_count;       /* How many Table objects uses this */
 
320
  uint32_t getTableCount()
 
321
  {
 
322
    return ref_count;
 
323
  }
 
324
 
312
325
  uint32_t null_bytes;
313
326
  uint32_t last_null_bit_pos;
314
327
  uint32_t fields;                              /* Number of fields */
343
356
 
344
357
  uint8_t blob_ptr_size;                        /* 4 or 8 */
345
358
  bool db_low_byte_first;               /* Portable row format */
 
359
 
346
360
  bool name_lock;
 
361
  bool isNameLock() const
 
362
  {
 
363
    return name_lock;
 
364
  }
 
365
 
347
366
  bool replace_with_name_lock;
 
367
 
348
368
  bool waiting_on_cond;                 /* Protection against free */
 
369
  bool isWaitingOnCondition()
 
370
  {
 
371
    return waiting_on_cond;
 
372
  }
349
373
 
350
374
  /*
351
375
    Set of keys in use, implemented as a Bitmap.
561
585
  static void cacheStop(void);
562
586
  static void release(TableShare *share);
563
587
  static void release(const char *key, uint32_t key_length);
 
588
  static TableDefinitionCache &getCache();
564
589
  static TableShare *getShare(const char *db, const char *table_name);
565
590
  static TableShare *getShare(Session *session, 
566
591
                              TableList *table_list, char *key,