~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/table_cache_dictionary/table_cache.cc

  • Committer: Brian Aker
  • Date: 2010-07-28 00:15:41 UTC
  • Revision ID: brian@gaz-20100728001541-p6rs038hko6xqakn
This patch turns the table_cache into boost::unordered_multimap.
This also removes a number of cases where we were using strcmp() on table
name/schema name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
{
48
48
  pthread_mutex_lock(&LOCK_open); /* Optionally lock for remove tables from open_cahe if not in use */
49
49
 
50
 
  for (uint32_t idx= 0; idx < get_open_cache().records; idx++ )
51
 
  {
52
 
    table= (Table*) hash_element(&get_open_cache(), idx);
53
 
    table_list.push_back(table);
 
50
  for (TableOpenCache::const_iterator iter= get_open_cache().begin();
 
51
       iter != get_open_cache().end();
 
52
       iter++)
 
53
   {
 
54
    table_list.push_back((*iter).second);
54
55
  }
55
56
  std::sort(table_list.begin(), table_list.end(), Table::compare);
56
57
}