~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/ha_archive.cc

Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
    table_definition_ext= ARZ;
146
146
  }
147
147
 
148
 
  virtual Cursor *create(TableShare *table,
 
148
  virtual Cursor *create(TableShare &table,
149
149
                          MEM_ROOT *mem_root)
150
150
  {
151
 
    return new (mem_root) ha_archive(this, table);
 
151
    return new (mem_root) ha_archive(*this, table);
152
152
  }
153
153
 
154
154
  const char **bas_ext() const {
208
208
int ArchiveEngine::doDropTable(Session&,
209
209
                               const string table_path)
210
210
{
211
 
  int error= 0;
212
 
  char buff[FN_REFLEN];
213
 
 
214
 
  fn_format(buff, table_path.c_str(), "", ARZ,
215
 
            MY_UNPACK_FILENAME|MY_APPEND_EXT);
216
 
  if (my_delete_with_symlink(buff, MYF(0)))
 
211
  string new_path(table_path);
 
212
 
 
213
  new_path+= ARZ;
 
214
 
 
215
  int error= unlink(new_path.c_str());
 
216
 
 
217
  if (error != 0)
217
218
  {
218
 
    if (my_errno != ENOENT)
219
 
    {
220
 
      error= my_errno;
221
 
    }
 
219
    error= my_errno= errno;
222
220
  }
223
221
 
224
222
  return error;
318
316
}
319
317
 
320
318
 
321
 
ha_archive::ha_archive(drizzled::plugin::StorageEngine *engine_arg,
322
 
                       TableShare *table_arg)
 
319
ha_archive::ha_archive(drizzled::plugin::StorageEngine &engine_arg,
 
320
                       TableShare &table_arg)
323
321
  :Cursor(engine_arg, table_arg), delayed_insert(0), bulk_insert(0)
324
322
{
325
323
  /* Set our original buffer from pre-allocated memory */