~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

  • Committer: Brian Aker
  • Date: 2009-10-30 15:58:06 UTC
  • mfrom: (1183.1.30 merge)
  • Revision ID: brian@gaz-20091030155806-bq7mu2f5ljtodn0h
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
  length= build_table_filename(path, sizeof(path),
158
158
                               ren_table->db, old_alias, false);
159
159
 
160
 
  if (plugin::StorageEngine::getTableProto(path, &table_proto) != EEXIST)
 
160
  if (plugin::StorageEngine::getTableDefinition(*session, path, ren_table->db, old_alias, false, &table_proto) != EEXIST)
161
161
  {
162
162
    my_error(ER_NO_SUCH_TABLE, MYF(0), ren_table->db, old_alias);
163
163
    return true;
164
164
  }
165
165
 
166
 
  engine= plugin::StorageEngine::findByName(session, table_proto.engine().name());
 
166
  engine= plugin::StorageEngine::findByName(*session, table_proto.engine().name());
167
167
 
168
168
  length= build_table_filename(path, sizeof(path),
169
169
                               new_db, new_alias, false);
170
170
 
171
 
  if (plugin::StorageEngine::getTableProto(path, NULL) != ENOENT)
 
171
  if (plugin::StorageEngine::getTableDefinition(*session, path, new_db, new_alias, false) != ENOENT)
172
172
  {
173
173
    my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias);
174
174
    return 1; // This can't be skipped