~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

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