~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisamchk.c

  • Committer: Monty Taylor
  • Date: 2008-07-02 14:48:53 UTC
  • mto: This revision was merged to the branch mainline in revision 51.
  • Revision ID: monty@inaugust.com-20080702144853-itrmls4ae3h07lbr
Removed everything marked TO_BE_REMOVED.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1021
1021
      }
1022
1022
      if (!error && param->testflag & T_SORT_RECORDS)
1023
1023
      {
 
1024
        uint key;
1024
1025
        /*
1025
 
          The data file is nowadays reopened in the repair code so we should
1026
 
          soon remove the following reopen-code
 
1026
          We can't update the index in mi_sort_records if we have a
 
1027
          prefix compressed or fulltext index
1027
1028
        */
1028
 
#ifndef TO_BE_REMOVED
1029
 
        if (param->out_flag & O_NEW_DATA)
1030
 
        {                       /* Change temp file to org file */
1031
 
          VOID(my_close(info->dfile,MYF(MY_WME))); /* Close new file */
1032
 
          error|=change_to_newfile(filename,MI_NAME_DEXT,DATA_TMP_EXT,
1033
 
                                   raid_chunks,
1034
 
                                   MYF(0));
1035
 
          if (mi_open_datafile(info,info->s, -1))
1036
 
            error=1;
1037
 
          param->out_flag&= ~O_NEW_DATA; /* We are using new datafile */
1038
 
          param->read_cache.file=info->dfile;
1039
 
        }
1040
 
#endif
1041
 
        if (! error)
 
1029
        my_bool update_index=1;
 
1030
        for (key=0 ; key < share->base.keys; key++)
 
1031
          if (share->keyinfo[key].flag & (HA_BINARY_PACK_KEY|HA_FULLTEXT))
 
1032
            update_index=0;
 
1033
 
 
1034
        error=mi_sort_records(param,info,filename,param->opt_sort_key,
 
1035
                           /* what is the following parameter for ? */
 
1036
                              (my_bool) !(param->testflag & T_REP),
 
1037
                              update_index);
 
1038
        datafile=info->dfile;   /* This is now locked */
 
1039
        if (!error && !update_index)
1042
1040
        {
1043
 
          uint key;
1044
 
          /*
1045
 
            We can't update the index in mi_sort_records if we have a
1046
 
            prefix compressed or fulltext index
1047
 
          */
1048
 
          my_bool update_index=1;
1049
 
          for (key=0 ; key < share->base.keys; key++)
1050
 
            if (share->keyinfo[key].flag & (HA_BINARY_PACK_KEY|HA_FULLTEXT))
1051
 
              update_index=0;
1052
 
 
1053
 
          error=mi_sort_records(param,info,filename,param->opt_sort_key,
1054
 
                             /* what is the following parameter for ? */
1055
 
                                (my_bool) !(param->testflag & T_REP),
1056
 
                                update_index);
1057
 
          datafile=info->dfile; /* This is now locked */
1058
 
          if (!error && !update_index)
1059
 
          {
1060
 
            if (param->verbose)
1061
 
              puts("Table had a compressed index;  We must now recreate the index");
1062
 
            error=mi_repair_by_sort(param,info,filename,1);
1063
 
          }
 
1041
          if (param->verbose)
 
1042
            puts("Table had a compressed index;  We must now recreate the index");
 
1043
          error=mi_repair_by_sort(param,info,filename,1);
1064
1044
        }
1065
1045
      }
1066
1046
      if (!error && param->testflag & T_SORT_INDEX)