~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.cc

  • Committer: David Shrewsbury
  • Date: 2011-01-13 18:43:55 UTC
  • mto: (2081.1.2 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2082.
  • Revision ID: shrewsbury.dave@gmail.com-20110113184355-wsmu0grg7tkxwdsc
Push ALTER SCHEMA through replication stream as proper GPB message instead of RAW_SQL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
  if (not check(schema_identifier))
48
48
    return false;
49
49
 
50
 
  drizzled::message::init(schema_message, session->lex->name.str);
 
50
  drizzled::message::schema::init(schema_message, session->lex->name.str);
51
51
 
52
52
  bool res = false;
53
53
  std::string path;
59
59
  }
60
60
  else
61
61
  {
62
 
    res= mysql_create_db(session, schema_message, is_if_not_exists);
 
62
    res= create_db(session, schema_message, session->getLex()->exists());
63
63
    if (unlikely(plugin::EventObserver::afterCreateDatabase(*session, path, res)))
64
64
    {
65
65
      my_error(ER_EVENT_OBSERVER_PLUGIN, MYF(0), path.c_str());
79
79
  if (not plugin::Authorization::isAuthorized(getSession()->user(), identifier))
80
80
    return false;
81
81
 
82
 
  if (not is_if_not_exists)
 
82
  if (not session->getLex()->exists())
83
83
  {
84
84
    if (plugin::StorageEngine::doesSchemaExist(identifier))
85
85
    {