~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Brian Aker
  • Date: 2010-06-16 17:29:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1625.
  • Revision ID: brian@gaz-20100616172900-fzv6n6nrtyhhny7x
Update for TableShare usage of key (remove a case where we had to build it). 

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