~stewart/drizzle/embedded-innodb-rnd-read

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Stewart Smith
  • Date: 2010-03-30 13:09:42 UTC
  • mfrom: (1310.1.38)
  • Revision ID: stewart@flamingspork.com-20100330130942-859uivdm20p36sk3
Merged embedded-innodb-write-row into embedded-innodb-rnd-read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    max_rows(0),
66
66
    table_proto(NULL),
67
67
    storage_engine(NULL),
68
 
    tmp_table(STANDARD_TABLE),
 
68
    tmp_table(message::Table::STANDARD),
69
69
    ref_count(0),
70
70
    null_bytes(0),
71
71
    last_null_bit_pos(0),
126
126
    max_rows(0),
127
127
    table_proto(NULL),
128
128
    storage_engine(NULL),
129
 
    tmp_table(STANDARD_TABLE),
 
129
    tmp_table(message::Table::STANDARD),
130
130
    ref_count(0),
131
131
    null_bytes(0),
132
132
    last_null_bit_pos(0),
213
213
    return table_name.str;
214
214
  }
215
215
 
 
216
  const char *getPath() const
 
217
  {
 
218
    return path.str;
 
219
  }
 
220
 
216
221
  const std::string &getTableName(std::string &name_arg) const
217
222
  {
218
223
    name_arg.clear();
337
342
  {
338
343
    return storage_engine;
339
344
  }
340
 
  enum tmp_table_type tmp_table;
 
345
 
 
346
  TableIdentifier::Type tmp_table;
341
347
 
342
348
  uint32_t ref_count;       /* How many Table objects uses this */
343
349
  uint32_t getTableCount()
499
505
    memset(this, 0, sizeof(TableShare));
500
506
    memory::init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
501
507
    table_category=         TABLE_CATEGORY_TEMPORARY;
502
 
    tmp_table=              INTERNAL_TMP_TABLE;
 
508
    tmp_table=              message::Table::INTERNAL;
503
509
    db.str=                 (char*) key;
504
510
    db.length=           strlen(key);
505
511
    table_cache_key.str=    (char*) key;
533
539
      If someone is waiting for this to be deleted, inform it about this.
534
540
      Don't do a delete until we know that no one is refering to this anymore.
535
541
    */
536
 
    if (tmp_table == STANDARD_TABLE)
 
542
    if (tmp_table == message::Table::STANDARD)
537
543
    {
538
544
      /* share->mutex is locked in release_table_share() */
539
545
      while (waiting_on_cond)
618
624
  static TableShare *getShare(Session *session, 
619
625
                              TableList *table_list, char *key,
620
626
                              uint32_t key_length, uint32_t, int *error);
 
627
 
 
628
  friend std::ostream& operator<<(std::ostream& output, const TableShare &share)
 
629
  {
 
630
    output << "TableShare:(";
 
631
    output <<  share.getSchemaName();
 
632
    output << ", ";
 
633
    output << share.getTableName();
 
634
    output << ", ";
 
635
    output << share.getTableTypeAsString();
 
636
    output << ", ";
 
637
    output << share.getPath();
 
638
    output << ")";
 
639
 
 
640
    return output;  // for multiple << operators.
 
641
  }
621
642
};
622
643
 
623
644
} /* namespace drizzled */