~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_engine/schema.cc

  • Committer: Monty Taylor
  • Date: 2010-09-22 07:05:47 UTC
  • mto: (1791.3.1 build)
  • mto: This revision was merged to the branch mainline in revision 1794.
  • Revision ID: mordred@inaugust.com-20100922070547-b0fwpqyihtw5nb74
Initial working local catalog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "drizzled/charset.h"
28
28
#include "drizzled/charset_info.h"
29
29
#include "drizzled/cursor.h"
 
30
#include "drizzled/data_home.h"
30
31
 
31
32
#include "drizzled/internal/my_sys.h"
32
33
 
44
45
using namespace std;
45
46
using namespace drizzled;
46
47
 
47
 
// This should always be the same value as GLOBAL_TEMPORARY_EXT but be
48
 
// CASE_UP. --Brian
49
 
static SchemaIdentifier TEMPORARY_IDENTIFIER(".TEMPORARY");
50
48
 
51
49
#define MY_DB_OPT_FILE "db.opt"
52
50
#define DEFAULT_FILE_EXTENSION ".dfe" // Deep Fried Elephant
69
67
 
70
68
void Schema::prime()
71
69
{
72
 
  CachedDirectory directory(data_home, CachedDirectory::DIRECTORY);
 
70
  CachedDirectory directory(getDataHomeCatalog(), CachedDirectory::DIRECTORY);
73
71
  CachedDirectory::Entries files= directory.getEntries();
74
72
 
75
73
  mutex.lock();
337
335
 
338
336
bool Schema::doCanCreateTable(const drizzled::TableIdentifier &identifier)
339
337
{
 
338
 
 
339
  // This should always be the same value as GLOBAL_TEMPORARY_EXT but be
 
340
  // CASE_UP. --Brian 
 
341
  //
 
342
  // This needs to be done static in here for ordering reasons
 
343
  static SchemaIdentifier TEMPORARY_IDENTIFIER(".TEMPORARY");
340
344
  if (static_cast<const SchemaIdentifier&>(identifier) == TEMPORARY_IDENTIFIER)
341
345
  {
342
346
    return false;