~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_schema.cc

  • Committer: Brian Aker
  • Date: 2010-03-31 05:53:34 UTC
  • Revision ID: brian@gaz-20100331055334-yqqmzlgqb2xq1p5b
Mass overhaul to use schema_identifier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  LEX_STRING *db= &session->lex->name;
38
38
  message::Schema old_definition;
39
39
 
40
 
  if (check_db_name(db))
 
40
  SchemaIdentifier schema_identifier(string(db->str, db->length));
 
41
 
 
42
  if (not check_db_name(schema_identifier))
41
43
  {
42
 
    my_error(ER_WRONG_DB_NAME, MYF(0), db->str);
 
44
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
43
45
    return false;
44
46
  }
45
47
 
46
48
  schema_message.set_name(db->str);
 
49
  SchemaIdentifier identifier(schema_message.name());
47
50
 
48
 
  if (not plugin::StorageEngine::getSchemaDefinition(schema_message.name(), old_definition))
 
51
  if (not plugin::StorageEngine::getSchemaDefinition(identifier, old_definition))
49
52
  {
50
53
    my_error(ER_SCHEMA_DOES_NOT_EXIST, MYF(0), db->str);
51
54
    return true;