~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_index.cc

  • Committer: Brian Aker
  • Date: 2010-10-24 01:44:25 UTC
  • mfrom: (1874.1.2 catalogs)
  • Revision ID: brian@tangent.org-20101024014425-exsst7015tqgbw7x
TableĀ encapsulateĀ merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  /* Chicken/Egg... we need to search for the table, to know if the table exists, so we can build a full identifier from it */
37
37
  message::Table original_table_message;
38
38
  {
39
 
    TableIdentifier identifier(first_table->db, first_table->table_name);
 
39
    TableIdentifier identifier(first_table->getSchemaName(), first_table->getTableName());
40
40
    if (plugin::StorageEngine::getTableDefinition(*session, identifier, original_table_message) != EEXIST)
41
41
    {
42
42
      my_error(ER_BAD_TABLE_ERROR, MYF(0), identifier.getSQLPath().c_str());
62
62
  bool res;
63
63
  if (original_table_message.type() == message::Table::STANDARD )
64
64
  {
65
 
    TableIdentifier identifier(first_table->db, first_table->table_name);
 
65
    TableIdentifier identifier(first_table->getSchemaName(), first_table->getTableName());
66
66
    create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(identifier);
67
67
 
68
68
    res= alter_table(session, 
77
77
  }
78
78
  else
79
79
  {
80
 
    TableIdentifier catch22(first_table->db, first_table->table_name);
 
80
    TableIdentifier catch22(first_table->getSchemaName(), first_table->getTableName());
81
81
    Table *table= session->find_temporary_table(catch22);
82
82
    assert(table);
83
83
    {
84
 
      TableIdentifier identifier(first_table->db, first_table->table_name, table->getMutableShare()->getPath());
 
84
      TableIdentifier identifier(first_table->getSchemaName(), first_table->getTableName(), table->getMutableShare()->getPath());
85
85
      create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(identifier);
86
86
 
87
87
      res= alter_table(session,