1022
1022
if (!error && param->testflag & T_SORT_RECORDS)
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
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,
1035
if (mi_open_datafile(info,info->s, -1))
1037
param->out_flag&= ~O_NEW_DATA; /* We are using new datafile */
1038
param->read_cache.file=info->dfile;
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))
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),
1038
datafile=info->dfile; /* This is now locked */
1039
if (!error && !update_index)
1045
We can't update the index in mi_sort_records if we have a
1046
prefix compressed or fulltext index
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))
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),
1057
datafile=info->dfile; /* This is now locked */
1058
if (!error && !update_index)
1061
puts("Table had a compressed index; We must now recreate the index");
1062
error=mi_repair_by_sort(param,info,filename,1);
1042
puts("Table had a compressed index; We must now recreate the index");
1043
error=mi_repair_by_sort(param,info,filename,1);
1066
1046
if (!error && param->testflag & T_SORT_INDEX)