~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_schema.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  {
38
38
    return true;
39
39
  }
40
 
  if (check_db_name(&session->lex->name))
 
40
  SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length));
 
41
  if (not check_db_name(schema_identifier))
41
42
  {
42
 
    my_error(ER_WRONG_DB_NAME, MYF(0), session->lex->name.str);
 
43
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
43
44
    return false;
44
45
  }
45
46
  if (session->inTransaction())
49
50
        MYF(0));
50
51
    return true;
51
52
  }
52
 
  bool res= mysql_rm_db(session, session->lex->name.str, drop_if_exists);
 
53
  bool res= mysql_rm_db(session, schema_identifier, drop_if_exists);
 
54
 
53
55
  return res;
54
56
}
55
57