~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_schema.cc

  • Committer: Brian Aker
  • Date: 2010-10-07 20:00:40 UTC
  • mto: (1822.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1823.
  • Revision ID: brian@tangent.org-20101007200040-st5l46s5i445vxoz
We no longer needed to look at the share when removing tables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
bool statement::AlterSchema::execute()
37
37
{
38
38
  LEX_STRING *db= &session->lex->name;
39
 
  message::schema::shared_ptr old_definition;
 
39
  message::Schema old_definition;
40
40
 
41
41
  if (not validateSchemaOptions())
42
42
    return true;
45
45
 
46
46
  if (not check_db_name(session, schema_identifier))
47
47
  {
48
 
    std::string path;
49
 
    schema_identifier.getSQLPath(path);
50
 
    my_error(ER_WRONG_DB_NAME, MYF(0), path.c_str());
51
 
 
 
48
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
52
49
    return false;
53
50
  }
54
51
 
71
68
  */
72
69
 
73
70
  // We set the name from the old version to keep case preference
74
 
  schema_message.set_name(old_definition->name());
75
 
  schema_message.set_version(old_definition->version());
76
 
  schema_message.set_uuid(old_definition->uuid());
77
 
  schema_message.mutable_engine()->set_name(old_definition->engine().name());
 
71
  schema_message.set_name(old_definition.name());
 
72
  schema_message.set_version(old_definition.version());
 
73
  schema_message.set_uuid(old_definition.uuid());
 
74
  schema_message.mutable_engine()->set_name(old_definition.engine().name());
78
75
 
79
76
  // We need to make sure we don't destroy any collation that might have
80
77
  // been changed.
81
78
  if (not schema_message.has_collation())
82
79
  {
83
 
    schema_message.set_collation(old_definition->collation());
 
80
    schema_message.set_collation(old_definition.collation());
84
81
  }
85
82
  
86
83
  drizzled::message::update(schema_message);