~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Brian Aker
  • Date: 2010-02-25 07:52:23 UTC
  • mto: (1273.13.101 build)
  • mto: This revision was merged to the branch mainline in revision 1309.
  • Revision ID: brian@gaz-20100225075223-125dkr0n8kpmobkj
Fix dropSchema().

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
namespace drizzled
53
53
{
54
54
 
55
 
const string del_exts[]= {".dfe", ".blk", ".arz", ".BAK", ".TMD", ".opt"};
 
55
const string del_exts[]= {".dfe", ".blk", ".arz", ".BAK", ".TMD"};
56
56
static set<string> deletable_extentions(del_exts, &del_exts[sizeof(del_exts)/sizeof(del_exts[0])]);
57
57
 
58
58
 
239
239
 
240
240
  length= build_table_filename(path, sizeof(path),
241
241
                               db, "", false);
242
 
  strcpy(path+length, MY_DB_OPT_FILE);         // Append db option file name
243
 
  unlink(path);
244
242
  path[length]= '\0';                           // Remove file name
245
243
 
246
244
  /* See if the directory exists */
578
576
  if (dropped_tables)
579
577
    *dropped_tables= tot_list;
580
578
 
581
 
  if (rmdir(org_path))
 
579
  if (not plugin::StorageEngine::dropSchema(db))
582
580
  {
583
 
    my_error(ER_DB_DROP_RMDIR, MYF(0), org_path, errno);
 
581
    my_error(ER_DROP_SCHEMA, MYF(0), db.c_str());
584
582
    return -1;
585
583
  }
586
584