~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_schema.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

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;