~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_engine/schema.cc

mergeĀ lp:~stewart/drizzle/remove-datahome-catalog

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <drizzled/sql_table.h>
27
27
#include <drizzled/charset.h>
28
28
#include <drizzled/cursor.h>
29
 
#include <drizzled/data_home.h>
 
29
#include <drizzled/catalog/local.h>
30
30
 
31
31
#include <drizzled/pthread_globals.h>
32
32
 
71
71
 
72
72
void Schema::prime()
73
73
{
74
 
  CachedDirectory directory(getDataHomeCatalog().file_string(), CachedDirectory::DIRECTORY);
 
74
  CachedDirectory directory(catalog::local_identifier().getPath(),
 
75
                            CachedDirectory::DIRECTORY, true);
 
76
 
75
77
  CachedDirectory::Entries files= directory.getEntries();
76
78
  boost::unique_lock<boost::shared_mutex> scopedLock(mutex);
77
79
 
80
82
    if (not entry->filename.compare(GLOBAL_TEMPORARY_EXT))
81
83
      continue;
82
84
    message::Schema schema_message;
83
 
    if (readSchemaFile(entry->filename, schema_message))
 
85
 
 
86
    std::string filename= catalog::local_identifier().getPath();
 
87
    filename+= FN_LIBCHAR;
 
88
    filename+= entry->filename;
 
89
 
 
90
    if (readSchemaFile(filename, schema_message))
84
91
    {
85
92
      identifier::Schema schema_identifier(schema_message.name());
86
93