~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/table_cache_dictionary/table_cache.cc

  • Committer: Stewart Smith
  • Date: 2010-07-29 16:44:36 UTC
  • mfrom: (1638.9.8)
  • mto: (1720.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1721.
  • Revision ID: stewart@flamingspork.com-20100729164436-dsrth68ahiuutvpe
merge trunk

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
}