~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_check.c

  • Committer: Brian Aker
  • Date: 2008-07-01 08:15:04 UTC
  • Revision ID: brian@tangent.org-20080701081504-qn3jzgsbb2twnchs
Large file and ftruncate() support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1665
1665
  {
1666
1666
    VOID(fputs("          \r",stdout)); VOID(fflush(stdout));
1667
1667
  }
1668
 
  if (my_chsize(share->kfile,info->state->key_file_length,0,MYF(0)))
 
1668
  if (ftruncate(share->kfile, info->state->key_file_length))
1669
1669
  {
1670
1670
    mi_check_print_warning(param,
1671
1671
                           "Can't change size of indexfile, error: %d",
2505
2505
      skr=share->base.reloc*share->base.min_pack_length;
2506
2506
#endif
2507
2507
    if (skr != sort_info.filelength && !info->s->base.raid_type)
2508
 
      if (my_chsize(info->dfile,skr,0,MYF(0)))
 
2508
      if (ftruncate(info->dfile, skr))
2509
2509
        mi_check_print_warning(param,
2510
2510
                               "Can't change size of datafile,  error: %d",
2511
2511
                               my_errno);
2513
2513
  if (param->testflag & T_CALC_CHECKSUM)
2514
2514
    info->state->checksum=param->glob_crc;
2515
2515
 
2516
 
  if (my_chsize(share->kfile,info->state->key_file_length,0,MYF(0)))
 
2516
  if (ftruncate(share->kfile, info->state->key_file_length))
2517
2517
    mi_check_print_warning(param,
2518
2518
                           "Can't change size of indexfile, error: %d",
2519
2519
                           my_errno);
3024
3024
      skr=share->base.reloc*share->base.min_pack_length;
3025
3025
#endif
3026
3026
    if (skr != sort_info.filelength && !info->s->base.raid_type)
3027
 
      if (my_chsize(info->dfile,skr,0,MYF(0)))
 
3027
      if (ftruncate(info->dfile, skr))
3028
3028
        mi_check_print_warning(param,
3029
3029
                               "Can't change size of datafile,  error: %d",
3030
3030
                               my_errno);
3032
3032
  if (param->testflag & T_CALC_CHECKSUM)
3033
3033
    info->state->checksum=param->glob_crc;
3034
3034
 
3035
 
  if (my_chsize(share->kfile,info->state->key_file_length,0,MYF(0)))
 
3035
  if (ftruncate(share->kfile, info->state->key_file_length))
3036
3036
    mi_check_print_warning(param,
3037
3037
                           "Can't change size of indexfile, error: %d", my_errno);
3038
3038