~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/schema_identifier.cc

  • Committer: Monty Taylor
  • Date: 2010-06-18 21:11:40 UTC
  • Revision ID: mordred@inaugust.com-20100618211140-wp8rdiz8m4up5cd6
Killed a valgrind warning that had snuck in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
static bool tablename_to_filename(const char *from, char *to, size_t to_length);
46
46
 
47
 
static size_t build_schema_filename(std::string &path, const char *db)
 
47
static size_t build_schema_filename(std::string &path, const std::string &db)
48
48
{
49
49
  char dbbuff[FN_REFLEN];
50
50
  bool conversion_error= false;
51
51
 
52
52
  memset(dbbuff, 0, sizeof(dbbuff));
53
 
  conversion_error= tablename_to_filename(db, dbbuff, sizeof(dbbuff));
 
53
  conversion_error= tablename_to_filename(db.c_str(), dbbuff, sizeof(dbbuff));
54
54
  if (conversion_error)
55
55
  {
56
56
    errmsg_printf(ERRMSG_LVL_ERROR,
135
135
 
136
136
SchemaIdentifier::SchemaIdentifier(const std::string &db_arg) :
137
137
  db(db_arg),
 
138
  db_path(""),
138
139
  lower_db(db_arg)
139
140
140
141
  std::transform(lower_db.begin(), lower_db.end(),
142
143
 
143
144
  if (not lower_db.empty())
144
145
  {
145
 
    drizzled::build_schema_filename(db_path, lower_db.c_str());
 
146
    drizzled::build_schema_filename(db_path, lower_db);
146
147
    assert(db_path.length()); // TODO throw exception, this is a possibility
147
148
  }
148
149
}