~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

  • Committer: Brian Aker
  • Date: 2009-11-26 18:50:02 UTC
  • mfrom: (1226.1.4 push)
  • Revision ID: brian@gaz-20091126185002-se908a2ceq9ub2rn
Mege of TableIdentifier gran patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
  char path[FN_REFLEN];
155
155
  size_t length;
156
156
 
 
157
  TableIdentifier old_identifier(ren_table->db, old_alias, NO_TMP_TABLE);
157
158
  length= build_table_filename(path, sizeof(path),
158
159
                               ren_table->db, old_alias, false);
159
160
 
160
 
  if (plugin::StorageEngine::getTableDefinition(*session, path, ren_table->db, old_alias, false, &table_proto) != EEXIST)
 
161
  if (plugin::StorageEngine::getTableDefinition(*session, old_identifier, &table_proto) != EEXIST)
161
162
  {
162
163
    my_error(ER_NO_SUCH_TABLE, MYF(0), ren_table->db, old_alias);
163
164
    return true;
168
169
  length= build_table_filename(path, sizeof(path),
169
170
                               new_db, new_alias, false);
170
171
 
171
 
  if (plugin::StorageEngine::getTableDefinition(*session, path, new_db, new_alias, false) != ENOENT)
 
172
  TableIdentifier new_identifier(new_db, new_alias, NO_TMP_TABLE);
 
173
  if (plugin::StorageEngine::getTableDefinition(*session, new_identifier) != ENOENT)
172
174
  {
173
175
    my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias);
174
176
    return 1; // This can't be skipped