~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <drizzled/message.h>
29
29
#include <drizzled/plugin/storage_engine.h>
30
30
#include <drizzled/sql_lex.h>
 
31
#include <drizzled/plugin/authorization.h>
31
32
 
32
33
#include <string>
33
34
 
34
35
using namespace std;
35
36
 
36
 
namespace drizzled
37
 
{
 
37
namespace drizzled {
38
38
 
39
39
bool statement::CreateSchema::execute()
40
40
{
47
47
    return true;
48
48
  }
49
49
 
50
 
  identifier::Schema schema_identifier(string(lex().name.str, lex().name.length));
 
50
  identifier::Schema schema_identifier(to_string(lex().name));
51
51
  if (not check(schema_identifier))
52
52
    return false;
53
53
 
54
 
  drizzled::message::schema::init(schema_message, lex().name.str);
 
54
  drizzled::message::schema::init(schema_message, lex().name.data());
 
55
 
 
56
  message::set_definer(schema_message, *session().user());
55
57
 
56
58
  bool res = false;
57
 
  std::string path;
58
 
  schema_identifier.getSQLPath(path);
 
59
  std::string path = schema_identifier.getSQLPath();
59
60
 
60
61
  if (unlikely(plugin::EventObserver::beforeCreateDatabase(session(), path)))
61
62
  {
115
116
}
116
117
 
117
118
} /* namespace drizzled */
118