~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

Merged up with build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
 
152
152
  plugin::StorageEngine *engine= NULL;
153
153
  message::Table table_proto;
154
 
  char path[FN_REFLEN];
155
 
  size_t length;
156
154
 
157
155
  TableIdentifier old_identifier(ren_table->db, old_alias, NO_TMP_TABLE);
158
 
  length= build_table_filename(path, sizeof(path),
159
 
                               ren_table->db, old_alias, false);
160
156
 
161
157
  if (plugin::StorageEngine::getTableDefinition(*session, old_identifier, &table_proto) != EEXIST)
162
158
  {
166
162
 
167
163
  engine= plugin::StorageEngine::findByName(*session, table_proto.engine().name());
168
164
 
169
 
  length= build_table_filename(path, sizeof(path),
170
 
                               new_db, new_alias, false);
171
 
 
172
165
  TableIdentifier new_identifier(new_db, new_alias, NO_TMP_TABLE);
173
166
  if (plugin::StorageEngine::getTableDefinition(*session, new_identifier) != ENOENT)
174
167
  {
197
190
      return ren_table;
198
191
  }
199
192
  return 0;
200
 
 
193
}
201
194
 
202
195
} /* namespace drizzled */