~stewart/drizzle/remove-unused-row-type-in-table-message

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Monty Taylor
  • Date: 2010-06-16 19:53:18 UTC
  • mfrom: (1619.1.2 rollup)
  • Revision ID: mordred@inaugust.com-20100616195318-tlcz0u7gig54vjnm
Merged Brian's TableShare key usage from lp:~brianaker/drizzle/tableshare-key

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
             TableIdentifier &identifier,
67
67
             char *path_arg= NULL, uint32_t path_length_arg= 0); // Shares for cache
68
68
 
69
 
  ~TableShare() 
70
 
  {
71
 
    assert(ref_count == 0);
72
 
 
73
 
    /*
74
 
      If someone is waiting for this to be deleted, inform it about this.
75
 
      Don't do a delete until we know that no one is refering to this anymore.
76
 
    */
77
 
    if (tmp_table == message::Table::STANDARD)
78
 
    {
79
 
      /* share->mutex is locked in release_table_share() */
80
 
      while (waiting_on_cond)
81
 
      {
82
 
        pthread_cond_broadcast(&cond);
83
 
        pthread_cond_wait(&cond, &mutex);
84
 
      }
85
 
      /* No thread refers to this anymore */
86
 
      pthread_mutex_unlock(&mutex);
87
 
      pthread_mutex_destroy(&mutex);
88
 
      pthread_cond_destroy(&cond);
89
 
    }
90
 
    hash_free(&name_hash);
91
 
 
92
 
    storage_engine= NULL;
93
 
 
94
 
    delete table_proto;
95
 
    table_proto= NULL;
96
 
 
97
 
    mem_root.free_root(MYF(0));                 // Free's share
98
 
  };
 
69
  ~TableShare();
99
70
 
100
71
private:
101
72
  /** Category of this table. */
290
261
    return path.str;
291
262
  }
292
263
 
293
 
  const char *getCacheKey() const // This should never be called when we aren't looking at a cache.
 
264
  const TableIdentifier::Key& getCacheKey() const // This should never be called when we aren't looking at a cache.
294
265
  {
295
266
    assert(private_key_for_cache.size());
296
 
    return &private_key_for_cache[0];
 
267
    return private_key_for_cache;
297
268
  }
298
269
 
299
270
  size_t getCacheKeySize() const