~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/ha_archive.cc

  • Committer: devananda
  • Date: 2009-06-30 14:27:54 UTC
  • mfrom: (1030.2.4 trunk)
  • mto: (1093.1.7 captain)
  • mto: This revision was merged to the branch mainline in revision 1095.
  • Revision ID: devananda.vdv@gmail.com-20090630142754-vm9w374yxkf1pikc
mergeĀ fromĀ lp

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
  }
579
579
 
580
580
  if (linkname[0])
581
 
    my_symlink(name_buff, linkname, MYF(0));
 
581
    if(symlink(name_buff, linkname) != 0)
 
582
      goto error2;
582
583
  fn_format(name_buff, table_name, "", ".frm",
583
584
            MY_REPLACE_EXT | MY_UNPACK_FILENAME);
584
585
 
1183
1184
    create_info->auto_increment_value= stats.auto_increment_value;
1184
1185
  }
1185
1186
 
1186
 
  if (!(my_readlink(share->real_path, share->data_file_name, MYF(0))))
 
1187
  ssize_t sym_link_size= readlink(share->data_file_name,share->real_path,FN_REFLEN-1);
 
1188
  if (sym_link_size >= 0) {
 
1189
    share->real_path[sym_link_size]= '\0';
1187
1190
    create_info->data_file_name= share->real_path;
 
1191
  }
1188
1192
 
1189
1193
  return;
1190
1194
}
1340
1344
  }
1341
1345
}
1342
1346
 
1343
 
/*
1344
 
  Check and repair the table if needed.
1345
 
*/
1346
 
bool ha_archive::check_and_repair(Session *session)
1347
 
{
1348
 
  HA_CHECK_OPT check_opt;
1349
 
 
1350
 
  check_opt.init();
1351
 
 
1352
 
  return(repair(session, &check_opt));
1353
 
}
1354
 
 
1355
1347
archive_record_buffer *ha_archive::create_record_buffer(unsigned int length)
1356
1348
{
1357
1349
  archive_record_buffer *r;