~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

Fix issue where there are too many files in data directory. We now only
cache files with correct ext. AKA... we no longer keep all the filenames in
memory. The comparison operation will have us holding the lock on directory
a little longer (aka... whatever the OS is doing).

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
Registry<plugin::StorageEngine *> all_engines;
58
58
static std::vector<plugin::StorageEngine *> vector_of_engines;
59
59
static std::vector<plugin::StorageEngine *> vector_of_transactional_engines;
 
60
static std::set<std::string> set_of_table_definition_ext;
60
61
 
61
62
plugin::StorageEngine::StorageEngine(const string name_arg,
62
63
                                     const bitset<HTON_BIT_SIZE> &flags_arg,
200
201
  if (engine->check_flag(HTON_BIT_DOES_TRANSACTIONS))
201
202
    vector_of_transactional_engines.push_back(engine);
202
203
 
 
204
  if (engine->getTableDefinotionExt().length())
 
205
  {
 
206
    assert(engine->getTableDefinotionExt().length() == MAX_STORAGE_ENGINE_FILE_EXT);
 
207
    set_of_table_definition_ext.insert(engine->getTableDefinotionExt());
 
208
  }
 
209
 
203
210
  return false;
204
211
}
205
212
 
845
852
 
846
853
  build_table_filename(tmp_path, sizeof(tmp_path), db.c_str(), "", false);
847
854
 
848
 
  CachedDirectory directory(tmp_path);
 
855
  CachedDirectory directory(tmp_path, set_of_table_definition_ext);
849
856
 
850
857
  if (db.compare("information_schema"))
851
858
  {