~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/ha_archive.cc

  • Committer: Brian Aker
  • Date: 2009-08-24 19:19:39 UTC
  • mfrom: (1121.1.6 merge)
  • Revision ID: brian@gaz-20090824191939-xcn528r7gwjc48h3
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
public:
220
220
  ArchiveEngine(const string &name_arg) : StorageEngine(name_arg,
221
221
                                      HTON_FILE_BASED
222
 
                                    | HTON_HAS_DATA_DICTIONARY
223
 
                                    | HTON_DATA_DIR) {}
 
222
                                    | HTON_HAS_DATA_DICTIONARY) {}
224
223
 
225
224
  virtual handler *create(TableShare *table,
226
225
                          MEM_ROOT *mem_root)
648
647
                                             drizzled::message::Table *proto)
649
648
{
650
649
  char name_buff[FN_REFLEN];
651
 
  char linkname[FN_REFLEN];
652
650
  int error= 0;
653
651
  azio_stream create_stream;            /* Archive file we are working with */
654
652
  uint64_t auto_increment_value;
677
675
  /*
678
676
    We reuse name_buff since it is available.
679
677
  */
680
 
  if (create_info->data_file_name && create_info->data_file_name[0] != '#')
681
 
  {
682
 
    fn_format(name_buff, create_info->data_file_name, "", ARZ,
683
 
              MY_REPLACE_EXT | MY_UNPACK_FILENAME);
684
 
    fn_format(linkname, table_name, "", ARZ,
685
 
              MY_REPLACE_EXT | MY_UNPACK_FILENAME);
686
 
  }
687
 
  else
688
 
  {
689
 
    fn_format(name_buff, table_name, "", ARZ,
690
 
              MY_REPLACE_EXT | MY_UNPACK_FILENAME);
691
 
    linkname[0]= 0;
692
 
  }
 
678
  fn_format(name_buff, table_name, "", ARZ,
 
679
            MY_REPLACE_EXT | MY_UNPACK_FILENAME);
693
680
 
694
681
  my_errno= 0;
695
682
  if (azopen(&create_stream, name_buff, O_CREAT|O_RDWR,
699
686
    goto error2;
700
687
  }
701
688
 
702
 
  if (linkname[0])
703
 
    if(symlink(name_buff, linkname) != 0)
704
 
      goto error2;
705
 
 
706
689
  proto->SerializeToString(&serialized_proto);
707
690
 
708
691
  if (azwrite_frm(&create_stream, serialized_proto.c_str(),