diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-11-24 16:08:35 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-12 20:27:34 +0100 |
commit | 961fc6a673ea3691f41f3d1f9eabfac799047fc4 (patch) | |
tree | a09bcd76a3c4a2591fc2d14718934ca7d1e9cfac /storage/myisam | |
parent | b634bd50edbef972294e970f800a957ac7f0200d (diff) | |
download | mariadb-git-961fc6a673ea3691f41f3d1f9eabfac799047fc4.tar.gz |
cleanup: T_REP/T_REP_BY_SORT/T_REP_PARALLEL in MyISAM
always set them according to the repair method used
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 4 | ||||
-rw-r--r-- | storage/myisam/mi_check.c | 8 | ||||
-rw-r--r-- | storage/myisam/myisamchk.c | 7 |
3 files changed, 9 insertions, 10 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index b5371a2b0c3..dbb72eac4c5 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1031,9 +1031,9 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) continue; } param.testflag&= ~T_QUICK; - if ((param.testflag & T_REP_BY_SORT)) + if ((param.testflag & (T_REP_BY_SORT | T_REP_PARALLEL))) { - param.testflag= (param.testflag & ~T_REP_BY_SORT) | T_REP; + param.testflag= (param.testflag & ~T_REP_ANY) | T_REP; sql_print_information("Retrying repair of: '%s' with keycache", table->s->path.str); continue; diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 57ac5bdca97..99d90e5648b 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -2207,7 +2207,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info, printf("- recovering (with sort) MyISAM-table '%s'\n",name); printf("Data records: %s\n", llstr(start_records,llbuff)); } - param->testflag|=T_REP; /* for easy checking */ + param->testflag|=T_REP_BY_SORT; /* for easy checking */ param->retry_repair= 0; param->warning_printed= param->error_printed= param->note_printed= 0; @@ -2637,7 +2637,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, printf("- parallel recovering (with sort) MyISAM-table '%s'\n",name); printf("Data records: %s\n", llstr(start_records,llbuff)); } - param->testflag|=T_REP; /* for easy checking */ + param->testflag|=T_REP_PARALLEL; /* for easy checking */ param->retry_repair= 0; param->warning_printed= 0; param->error_printed= 0; @@ -3555,7 +3555,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) if (sort_param->calc_checksum) info->checksum= (*info->s->calc_check_checksum)(info, sort_param->record); - if ((param->testflag & (T_EXTEND | T_REP)) || searching) + if ((param->testflag & (T_EXTEND | T_REP_ANY)) || searching) { if (_mi_rec_check(info, sort_param->record, sort_param->rec_buff, sort_param->find_length, @@ -4509,7 +4509,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info, DBUG_VOID_RETURN; } if (!(param->testflag & T_SILENT) && - !(param->testflag & T_REP)) + !(param->testflag & T_REP_ANY)) printf("Updating MyISAM file: %s\n", param->isam_file_name); /* We have to use an allocated buffer instead of info->rec_buff as diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 7835ab83531..c206b562d72 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -94,11 +94,10 @@ int main(int argc, char **argv) (void) fflush(stderr); if ((check_param.error_printed | check_param.warning_printed) && (check_param.testflag & T_FORCE_CREATE) && - (!(check_param.testflag & (T_REP | T_REP_BY_SORT | T_SORT_RECORDS | - T_SORT_INDEX)))) + (!(check_param.testflag & (T_REP_ANY | T_SORT_RECORDS | T_SORT_INDEX)))) { ulonglong old_testflag=check_param.testflag; - if (!(check_param.testflag & T_REP)) + if (!(check_param.testflag & T_REP_ANY)) check_param.testflag|= T_REP_BY_SORT; check_param.testflag&= ~T_EXTEND; /* Don't needed */ error|=myisamchk(&check_param, argv[-1]); @@ -1067,7 +1066,7 @@ static int myisamchk(HA_CHECK *param, char * filename) error=mi_sort_records(param,info,filename,param->opt_sort_key, /* what is the following parameter for ? */ - (my_bool) !(param->testflag & T_REP), + (my_bool) !(param->testflag & T_REP_ANY), update_index); datafile=info->dfile; /* This is now locked */ if (!error && !update_index) |