From 9837748e5fa7baaeaa3f5d084571df5c05a7057e Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 14 Nov 2003 22:08:45 +0100 Subject: obligatory update checksum on repair, if it is obligatory verified on check. --- myisam/mi_check.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'myisam') diff --git a/myisam/mi_check.c b/myisam/mi_check.c index a4ae7b25dbb..466defe8fbc 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1153,6 +1153,9 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, } param->testflag|=T_REP; /* for easy checking */ + if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) + param->testflag|=T_CALC_CHECKSUM; + if (!param->using_global_keycache) VOID(init_key_cache(param->use_buffers)); @@ -1820,6 +1823,9 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, } param->testflag|=T_REP; /* for easy checking */ + if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) + param->testflag|=T_CALC_CHECKSUM; + bzero((char*)&sort_info,sizeof(sort_info)); bzero((char *)&sort_param, sizeof(sort_param)); if (!(sort_info.key_block= @@ -2189,6 +2195,9 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, } param->testflag|=T_REP; /* for easy checking */ + if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) + param->testflag|=T_CALC_CHECKSUM; + bzero((char*)&sort_info,sizeof(sort_info)); if (!(sort_info.key_block= alloc_key_blocks(param, -- cgit v1.2.1 From 0c2107c6b4b532065813487c0ce4170fe89299e7 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Wed, 19 Nov 2003 23:07:31 +0100 Subject: minor fixups: more verbose on "no memory" errors - report requested size, avoid flushing rec buffer to a file that is closed and deleted already (on got_error=1) --- myisam/mi_check.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'myisam') diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 466defe8fbc..7108fdcba9e 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1368,6 +1368,7 @@ err: VOID(my_close(new_file,MYF(0))); VOID(my_raid_delete(param->temp_filename,info->s->base.raid_chunks, MYF(MY_WME))); + info->rec_cache.file=-1; /* don't flush data to new_file, it's closed */ } mi_mark_crashed_on_repair(info); } @@ -2852,8 +2853,8 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) if (!(to=mi_alloc_rec_buff(info,block_info.rec_len, &(sort_param->rec_buff)))) { - mi_check_print_error(param,"Not enough memory for blob at %s", - llstr(sort_param->start_recpos,llbuff)); + mi_check_print_error(param,"Not enough memory for blob at %s (need %lu)", + llstr(sort_param->start_recpos,llbuff), block_info.rec_len); DBUG_RETURN(1); } } -- cgit v1.2.1