~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

Merge in SQL reserved word patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
  Select_Lex *select_lex= &session->lex->select_lex;
90
90
  bool need_start_waiting= false;
91
91
 
 
92
  is_engine_set= not createTableMessage().engine().name().empty();
 
93
 
92
94
  if (is_engine_set)
93
95
  {
94
 
    create_info.db_type= 
95
 
      plugin::StorageEngine::findByName(*session, create_table_message.engine().name());
 
96
    create_info().db_type= 
 
97
      plugin::StorageEngine::findByName(*session, createTableMessage().engine().name());
96
98
 
97
 
    if (create_info.db_type == NULL)
 
99
    if (create_info().db_type == NULL)
98
100
    {
99
101
      my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), 
100
 
               create_table_message.engine().name().c_str());
 
102
               createTableMessage().engine().name().c_str());
101
103
 
102
104
      return true;
103
105
    }
118
120
      return true;
119
121
    }
120
122
 
121
 
    if (not  create_info.db_type)
 
123
    if (not  create_info().db_type)
122
124
    {
123
 
      create_info.db_type= 
 
125
      create_info().db_type= 
124
126
        plugin::StorageEngine::findByName(*session, original_table_message->engine().name());
125
127
 
126
 
      if (not create_info.db_type)
 
128
      if (not create_info().db_type)
127
129
      {
128
130
        std::string path;
129
131
        identifier.getSQLPath(path);
153
155
    res= alter_table(session, 
154
156
                     identifier,
155
157
                     new_identifier,
156
 
                     &create_info,
 
158
                     &create_info(),
157
159
                     *original_table_message,
158
 
                     create_table_message,
 
160
                     createTableMessage(),
159
161
                     first_table,
160
162
                     &alter_info,
161
163
                     select_lex->order_list.elements,
176
178
      res= alter_table(session, 
177
179
                       identifier,
178
180
                       new_identifier,
179
 
                       &create_info,
 
181
                       &create_info(),
180
182
                       *original_table_message,
181
 
                       create_table_message,
 
183
                       createTableMessage(),
182
184
                       first_table,
183
185
                       &alter_info,
184
186
                       select_lex->order_list.elements,