~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2009-05-27 23:03:42 UTC
  • mto: This revision was merged to the branch mainline in revision 1040.
  • Revision ID: brian@gaz-20090527230342-aeawr11tz8ra050q
Refactor for build_table_filename()

Show diffs side-by-side

added added

removed removed

Lines of Context:
450
450
    /* Default way of knowing if a table exists. (checking .frm exists) */
451
451
 
452
452
    char path[FN_REFLEN];
453
 
    build_table_filename(path, sizeof(path),
454
 
                         db, name, "", 0);
 
453
    size_t length;
 
454
    length= build_table_filename(path, sizeof(path),
 
455
                                 db, name, false);
455
456
    if (table_proto_exists(path)==EEXIST)
456
457
    {
457
458
      drizzled::message::Table table;
458
 
      build_table_filename(path, sizeof(path),
459
 
                           db, name, ".dfe", 0);
460
 
      if(drizzle_read_table_proto(path, &table)==0)
 
459
      strcpy(path + length, ".dfe");
 
460
      if (drizzle_read_table_proto(path, &table) == 0)
461
461
      {
462
462
        LEX_STRING engine_name= { (char*)table.engine().name().c_str(),
463
463
                                 strlen(table.engine().name().c_str()) };