~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_schema.cc

  • Committer: Brian Aker
  • Date: 2011-01-22 18:52:16 UTC
  • mfrom: (2098.4.1 catalogs)
  • Revision ID: brian@tangent.org-20110122185216-18and6vncipd7x72
Session encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
bool statement::AlterSchema::execute()
37
37
{
38
 
  LEX_STRING *db= &session->lex->name;
 
38
  LEX_STRING *db= &getSession()->lex->name;
39
39
  message::schema::shared_ptr old_definition;
40
40
 
41
41
  if (not validateSchemaOptions())
43
43
 
44
44
  identifier::Schema schema_identifier(string(db->str, db->length));
45
45
 
46
 
  if (not check_db_name(session, schema_identifier))
 
46
  if (not check_db_name(getSession(), schema_identifier))
47
47
  {
48
48
    my_error(ER_WRONG_DB_NAME, schema_identifier);
49
49
 
57
57
    return true;
58
58
  }
59
59
 
60
 
  if (session->inTransaction())
 
60
  if (getSession()->inTransaction())
61
61
  {
62
62
    my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0));
63
63
    return true;
83
83
  
84
84
  drizzled::message::update(schema_message);
85
85
 
86
 
  bool res= alter_db(session, schema_message, old_definition);
 
86
  bool res= alter_db(getSession(), schema_message, old_definition);
87
87
 
88
88
  return not res;
89
89
}