~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_index.cc

  • Committer: Monty Taylor
  • Date: 2010-10-26 17:38:18 UTC
  • mto: (1880.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1881.
  • Revision ID: mordred@inaugust.com-20101026173818-1yol32mb18o66mmu
Turned some plugins off of load_by_default so we can package them easier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
  TableList *all_tables= session->lex->query_tables;
35
35
 
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
 
  message::table::shared_ptr original_table_message;
 
37
  message::Table original_table_message;
38
38
  {
39
39
    TableIdentifier identifier(first_table->getSchemaName(), first_table->getTableName());
40
40
    if (plugin::StorageEngine::getTableDefinition(*session, identifier, original_table_message) != EEXIST)
41
41
    {
42
 
      std::string path;
43
 
      identifier.getSQLPath(path);
44
 
      my_error(ER_BAD_TABLE_ERROR, MYF(0), path.c_str());
 
42
      my_error(ER_BAD_TABLE_ERROR, MYF(0), identifier.getSQLPath().c_str());
45
43
      return true;
46
44
    }
47
45
  }
62
60
  }
63
61
 
64
62
  bool res;
65
 
  if (original_table_message->type() == message::Table::STANDARD )
 
63
  if (original_table_message.type() == message::Table::STANDARD )
66
64
  {
67
65
    TableIdentifier identifier(first_table->getSchemaName(), first_table->getTableName());
68
66
    create_info.default_table_charset= plugin::StorageEngine::getSchemaCollation(identifier);
71
69
                     identifier,
72
70
                     identifier,
73
71
                     &create_info, 
74
 
                     *original_table_message,
 
72
                     original_table_message,
75
73
                     create_table_message, 
76
74
                     first_table,
77
75
                     &alter_info,
78
 
                     0, (Order*) 0, 0);
 
76
                     0, (order_st*) 0, 0);
79
77
  }
80
78
  else
81
79
  {
90
88
                       identifier,
91
89
                       identifier,
92
90
                       &create_info, 
93
 
                       *original_table_message,
 
91
                       original_table_message,
94
92
                       create_table_message, 
95
93
                       first_table,
96
94
                       &alter_info,
97
 
                       0, (Order*) 0, 0);
 
95
                       0, (order_st*) 0, 0);
98
96
    }
99
97
  }
100
98