~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.cc

  • Committer: Brian Aker
  • Date: 2010-02-25 07:54:52 UTC
  • mfrom: (1273.13.101 build)
  • Revision ID: brian@gaz-20100225075452-19eozreshbrerypu
Merge of all patches in build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
bool statement::CreateSchema::execute()
35
35
{
36
 
  if (! session->endActiveTransaction())
 
36
  if (not session->endActiveTransaction())
37
37
  {
38
38
    return true;
39
39
  }
40
 
  char *alias= session->strmake(session->lex->name.str,
41
 
                                session->lex->name.length);
42
 
  if (! alias ||
43
 
      check_db_name(&session->lex->name))
 
40
 
 
41
  if (check_db_name(&session->lex->name))
44
42
  {
45
43
    my_error(ER_WRONG_DB_NAME, MYF(0), session->lex->name.str);
46
44
    return false;
47
45
  }
48
46
 
49
 
  bool res= mysql_create_db(session, session->lex->name.str, &schema_message, is_if_not_exists);
50
 
  return res;
 
47
  schema_message.set_name(session->lex->name.str);
 
48
  if (not schema_message.has_collation())
 
49
  {
 
50
    schema_message.set_collation(default_charset_info->name);
 
51
  }
 
52
 
 
53
  bool res= mysql_create_db(session, schema_message, is_if_not_exists);
 
54
  return not res;
51
55
}
52
56
 
53
57
} /* namespace drizzled */