~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_index.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:
39
39
    TableIdentifier identifier(first_table->db, first_table->table_name);
40
40
    if (plugin::StorageEngine::getTableDefinition(*session, identifier, original_table_message) != EEXIST)
41
41
    {
42
 
      my_error(ER_TABLE_EXISTS_ERROR, MYF(0), identifier.getSQLPath().c_str());
 
42
      my_error(ER_BAD_TABLE_ERROR, MYF(0), identifier.getSQLPath().c_str());
43
43
      return true;
44
44
    }
45
45
  }
60
60
  }
61
61
 
62
62
  create_info.row_type= ROW_TYPE_NOT_USED;
63
 
  create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(session->db.c_str());
64
63
 
65
64
  bool res;
66
65
  if (original_table_message.type() == message::Table::STANDARD )
67
66
  {
68
67
    TableIdentifier identifier(first_table->db, first_table->table_name);
 
68
    create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(identifier);
69
69
 
70
70
    res= alter_table(session, 
71
71
                     identifier,
82
82
    assert(table);
83
83
    {
84
84
      TableIdentifier identifier(first_table->db, first_table->table_name, table->s->path.str);
 
85
      create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(identifier);
85
86
 
86
87
      res= alter_table(session, 
87
88
                       identifier,