|
|
@ -140,11 +140,10 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) |
|
|
{ |
|
|
{ |
|
|
reg2 ha_rows i; |
|
|
reg2 ha_rows i; |
|
|
uint delete_link_length; |
|
|
uint delete_link_length; |
|
|
my_off_t empty,next_link,old_link; |
|
|
|
|
|
|
|
|
my_off_t empty,next_link,UNINIT_VAR(old_link); |
|
|
char buff[22],buff2[22]; |
|
|
char buff[22],buff2[22]; |
|
|
DBUG_ENTER("chk_del"); |
|
|
DBUG_ENTER("chk_del"); |
|
|
|
|
|
|
|
|
LINT_INIT(old_link); |
|
|
|
|
|
param->record_checksum=0; |
|
|
param->record_checksum=0; |
|
|
delete_link_length=((info->s->options & HA_OPTION_PACK_RECORD) ? 20 : |
|
|
delete_link_length=((info->s->options & HA_OPTION_PACK_RECORD) ? 20 : |
|
|
info->s->rec_reflength+1); |
|
|
info->s->rec_reflength+1); |
|
|
@ -937,11 +936,11 @@ static uint isam_key_length(MI_INFO *info, register MI_KEYDEF *keyinfo) |
|
|
int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) |
|
|
int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) |
|
|
{ |
|
|
{ |
|
|
int error,got_error,flag; |
|
|
int error,got_error,flag; |
|
|
uint key,left_length,b_type,field; |
|
|
|
|
|
|
|
|
uint key,UNINIT_VAR(left_length),b_type,field; |
|
|
ha_rows records,del_blocks; |
|
|
ha_rows records,del_blocks; |
|
|
my_off_t used,empty,pos,splits,start_recpos, |
|
|
|
|
|
|
|
|
my_off_t used,empty,pos,splits,UNINIT_VAR(start_recpos), |
|
|
del_length,link_used,start_block; |
|
|
del_length,link_used,start_block; |
|
|
uchar *record= 0, *to; |
|
|
|
|
|
|
|
|
uchar *record= 0, *UNINIT_VAR(to); |
|
|
char llbuff[22],llbuff2[22],llbuff3[22]; |
|
|
char llbuff[22],llbuff2[22],llbuff3[22]; |
|
|
ha_checksum intern_record_checksum; |
|
|
ha_checksum intern_record_checksum; |
|
|
ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY]; |
|
|
ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY]; |
|
|
@ -966,7 +965,6 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) |
|
|
records=del_blocks=0; |
|
|
records=del_blocks=0; |
|
|
used=link_used=splits=del_length=0; |
|
|
used=link_used=splits=del_length=0; |
|
|
intern_record_checksum=param->glob_crc=0; |
|
|
intern_record_checksum=param->glob_crc=0; |
|
|
LINT_INIT(left_length); LINT_INIT(start_recpos); LINT_INIT(to); |
|
|
|
|
|
got_error=error=0; |
|
|
got_error=error=0; |
|
|
empty=info->s->pack.header_length; |
|
|
empty=info->s->pack.header_length; |
|
|
|
|
|
|
|
|
@ -2226,9 +2224,8 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, |
|
|
ulong *rec_per_key_part; |
|
|
ulong *rec_per_key_part; |
|
|
char llbuff[22]; |
|
|
char llbuff[22]; |
|
|
SORT_INFO sort_info; |
|
|
SORT_INFO sort_info; |
|
|
ulonglong key_map; |
|
|
|
|
|
|
|
|
ulonglong UNINIT_VAR(key_map); |
|
|
DBUG_ENTER("mi_repair_by_sort"); |
|
|
DBUG_ENTER("mi_repair_by_sort"); |
|
|
LINT_INIT(key_map); |
|
|
|
|
|
|
|
|
|
|
|
start_records=info->state->records; |
|
|
start_records=info->state->records; |
|
|
got_error=1; |
|
|
got_error=1; |
|
|
@ -2650,11 +2647,10 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, |
|
|
IO_CACHE new_data_cache; /* For non-quick repair. */ |
|
|
IO_CACHE new_data_cache; /* For non-quick repair. */ |
|
|
IO_CACHE_SHARE io_share; |
|
|
IO_CACHE_SHARE io_share; |
|
|
SORT_INFO sort_info; |
|
|
SORT_INFO sort_info; |
|
|
ulonglong key_map; |
|
|
|
|
|
|
|
|
ulonglong UNINIT_VAR(key_map); |
|
|
pthread_attr_t thr_attr; |
|
|
pthread_attr_t thr_attr; |
|
|
ulong max_pack_reclength; |
|
|
ulong max_pack_reclength; |
|
|
DBUG_ENTER("mi_repair_parallel"); |
|
|
DBUG_ENTER("mi_repair_parallel"); |
|
|
LINT_INIT(key_map); |
|
|
|
|
|
|
|
|
|
|
|
start_records=info->state->records; |
|
|
start_records=info->state->records; |
|
|
got_error=1; |
|
|
got_error=1; |
|
|
@ -3241,7 +3237,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) |
|
|
int parallel_flag; |
|
|
int parallel_flag; |
|
|
uint found_record,b_type,left_length; |
|
|
uint found_record,b_type,left_length; |
|
|
my_off_t pos; |
|
|
my_off_t pos; |
|
|
uchar *to; |
|
|
|
|
|
|
|
|
uchar *UNINIT_VAR(to); |
|
|
MI_BLOCK_INFO block_info; |
|
|
MI_BLOCK_INFO block_info; |
|
|
SORT_INFO *sort_info=sort_param->sort_info; |
|
|
SORT_INFO *sort_info=sort_param->sort_info; |
|
|
MI_CHECK *param=sort_info->param; |
|
|
MI_CHECK *param=sort_info->param; |
|
|
|