~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.cc

  • Committer: Brian Aker
  • Date: 2010-01-22 00:53:13 UTC
  • Revision ID: brian@gaz-20100122005313-jmizcbcdi1lt4tcx
Revert db patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
bool statement::CreateSchema::execute()
35
35
{
36
 
  string database_name(session->lex->name.str);
37
 
  NonNormalisedDatabaseName non_normalised_database_name(database_name);
38
 
  NormalisedDatabaseName normalised_database_name(non_normalised_database_name);
39
 
 
40
 
 
41
36
  if (! session->endActiveTransaction())
42
37
  {
43
38
    return true;
44
39
  }
45
 
  if (! session->lex->name.str ||
46
 
      ! normalised_database_name.isValid())
 
40
  char *alias= session->strmake(session->lex->name.str,
 
41
                                session->lex->name.length);
 
42
  if (! alias ||
 
43
      check_db_name(&session->lex->name))
47
44
  {
48
45
    my_error(ER_WRONG_DB_NAME, MYF(0), session->lex->name.str);
49
46
    return false;
50
47
  }
51
 
  bool res= mysql_create_db(session, normalised_database_name, &schema_message, is_if_not_exists);
 
48
 
 
49
  bool res= mysql_create_db(session, session->lex->name.str, &schema_message, is_if_not_exists);
52
50
  return res;
53
51
}
54
52