~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/show_dictionary/show_table_status.cc

  • Committer: Jay Pipes
  • Date: 2010-04-08 16:27:25 UTC
  • mfrom: (1405.6.10 replication-pairs)
  • mto: This revision was merged to the branch mainline in revision 1457.
  • Revision ID: jpipes@serialcoder-20100408162725-sugbgn38oxjqclq2
Merge trunk and replication-pairs with conflict resolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
  schema_predicate.append(select->getShowSchema());
52
52
 
53
 
  pthread_mutex_lock(&LOCK_open); /* Optionally lock for remove tables from open_cahe if not in use */
54
 
 
55
 
  drizzled::HASH *open_cache=
56
 
    get_open_cache();
57
 
 
58
 
  for (uint32_t idx= 0; idx < open_cache->records; idx++ )
 
53
  if (schema_predicate.empty())
59
54
  {
60
 
    table= (Table*) hash_element(open_cache, idx);
61
 
    table_list.push_back(table);
 
55
    schema_predicate.append(getSession().db);
62
56
  }
63
57
 
64
 
  for (table= getSession().temporary_tables; table; table= table->next)
 
58
  if (not schema_predicate.empty())
65
59
  {
66
 
    if (table->getShare())
 
60
    pthread_mutex_lock(&LOCK_open); /* Optionally lock for remove tables from open_cahe if not in use */
 
61
 
 
62
    drizzled::HASH *open_cache=
 
63
      get_open_cache();
 
64
 
 
65
    for (uint32_t idx= 0; idx < open_cache->records; idx++ )
67
66
    {
 
67
      table= (Table*) hash_element(open_cache, idx);
68
68
      table_list.push_back(table);
69
69
    }
 
70
 
 
71
    for (table= getSession().temporary_tables; table; table= table->next)
 
72
    {
 
73
      if (table->getShare())
 
74
      {
 
75
        table_list.push_back(table);
 
76
      }
 
77
    }
 
78
    std::sort(table_list.begin(), table_list.end(), Table::compare);
70
79
  }
71
 
  std::sort(table_list.begin(), table_list.end(), Table::compare);
72
80
}
73
81
 
74
82
ShowTableStatus::Generator::~Generator()