~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/schema.cc

  • Committer: Monty Taylor
  • Date: 2010-09-23 01:53:13 UTC
  • mto: (1791.3.1 build)
  • mto: This revision was merged to the branch mainline in revision 1794.
  • Revision ID: mordred@inaugust.com-20100923015313-w0b6vyw8l6ygqcja
Cleaned up the initial pass at this. It's not perfect, but it does work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "drizzled/session.h"
27
27
#include "drizzled/current_session.h"
28
28
#include "drizzled/internal/my_sys.h"
29
 
#include "drizzled/data_home.h"
30
29
 
31
30
#include <algorithm>
32
31
#include <sstream>
61
60
  }
62
61
   
63
62
 
64
 
  int rootdir_len= strlen(FN_ROOTDIR);
65
 
  path.append(getDataHomeCatalog());
66
 
  ssize_t without_rootdir= path.length() - rootdir_len;
67
 
 
68
 
  /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */
69
 
  if (without_rootdir >= 0)
70
 
  {
71
 
    const char *tmp= path.c_str() + without_rootdir;
72
 
 
73
 
    if (memcmp(tmp, FN_ROOTDIR, rootdir_len) != 0)
74
 
      path.append(FN_ROOTDIR);
75
 
  }
76
 
 
77
63
  path.append(dbbuff);
78
64
 
79
65
  return path.length();