@@ -590,8 +590,8 @@ int maria_chk_key(HA_CHECK *param, register MARIA_HA *info)
590590 {
591591_ma_check_print_error (param ,"Found %s keys of %s" ,llstr (keys ,buff ),
592592 llstr (share -> state .state .records ,buff2 ));
593- if (!(param -> testflag & T_INFO ))
594- DBUG_RETURN (-1 );
593+ if (!(param -> testflag & ( T_INFO | T_EXTEND ) ))
594+ DBUG_RETURN (-1 );
595595result = -1 ;
596596continue ;
597597 }
@@ -1119,8 +1119,8 @@ static uint isam_key_length(MARIA_HA *info, register MARIA_KEYDEF *keyinfo)
11191119
11201120
11211121
1122- static void record_pos_to_txt (MARIA_HA * info , my_off_t recpos ,
1123- char * buff )
1122+ static char * record_pos_to_txt (MARIA_HA * info , my_off_t recpos ,
1123+ char * buff )
11241124{
11251125 if (info -> s -> data_file_type != BLOCK_RECORD )
11261126 llstr (recpos , buff );
@@ -1132,6 +1132,7 @@ static void record_pos_to_txt(MARIA_HA *info, my_off_t recpos,
11321132 * (end ++ )= ':' ;
11331133 longlong10_to_str (row , end , 10 );
11341134 }
1135+ return buff ;
11351136}
11361137
11371138
@@ -1195,11 +1196,14 @@ static int check_keys_in_record(HA_CHECK *param, MARIA_HA *info, int extend,
11951196 _ma_search (info , & key , SEARCH_SAME , share -> state .key_root [keynr ]);
11961197 if (search_result )
11971198 {
1198- record_pos_to_txt (info , start_recpos , llbuff );
11991199 _ma_check_print_error (param ,
12001200 "Record at: %14s "
12011201 "Can't find key for index: %2d" ,
1202- llbuff , keynr + 1 );
1202+ record_pos_to_txt (info , start_recpos ,
1203+ llbuff ),
1204+ keynr + 1 );
1205+ if (param -> testflag & T_VERBOSE )
1206+ _ma_print_key (stdout , & key );
12031207 if (param -> err_count ++ > MAXERR || !(param -> testflag & T_VERBOSE ))
12041208 return -1 ;
12051209 }
@@ -2731,8 +2735,11 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
27312735 "Duplicate key %2d for record at %10s against "
27322736 "new record at %10s" ,
27332737 info -> errkey + 1 ,
2734- llstr (sort_param .current_filepos , llbuff ),
2735- llstr (info -> dup_key_pos ,llbuff2 ));
2738+ record_pos_to_txt (info ,
2739+ sort_param .current_filepos ,
2740+ llbuff ),
2741+ record_pos_to_txt (info ,
2742+ info -> dup_key_pos , llbuff2 ));
27362743 if (param -> testflag & T_VERBOSE )
27372744 {
27382745 MARIA_KEY tmp_key ;
@@ -4895,10 +4902,12 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
48954902 {
48964903 if (param -> testflag & T_VERBOSE )
48974904 {
4898- record_pos_to_txt (info , info -> cur_row .lastpos , llbuff );
48994905 _ma_check_print_info (param ,
49004906 "Found record with wrong checksum at %s" ,
4901- llbuff );
4907+ record_pos_to_txt (info ,
4908+ info -> cur_row .lastpos ,
4909+ llbuff ));
4910+
49024911 }
49034912 continue ;
49044913 }
@@ -5517,6 +5526,7 @@ static int sort_key_write(MARIA_SORT_PARAM *sort_param, const uchar *a)
55175526 char llbuff [22 ],llbuff2 [22 ];
55185527 MARIA_SORT_INFO * sort_info = sort_param -> sort_info ;
55195528 HA_CHECK * param = sort_info -> param ;
5529+ MARIA_HA * info = sort_info -> info ;
55205530 int cmp ;
55215531
55225532 if (sort_info -> key_block -> inited )
@@ -5559,11 +5569,14 @@ static int sort_key_write(MARIA_SORT_PARAM *sort_param, const uchar *a)
55595569 "Duplicate key %2u for record at %10s against "
55605570 "record at %10s" ,
55615571 sort_param -> key + 1 ,
5562- llstr (sort_info -> info -> cur_row .lastpos , llbuff ),
5563- llstr (get_record_for_key (sort_param -> keyinfo ,
5564- sort_info -> key_block ->
5565- lastkey ),
5566- llbuff2 ));
5572+ record_pos_to_txt (info ,
5573+ sort_info -> info -> cur_row .lastpos ,
5574+ llbuff ),
5575+ record_pos_to_txt (info ,
5576+ get_record_for_key (sort_param ->
5577+ keyinfo ,
5578+ sort_info -> key_block -> lastkey ),
5579+ llbuff2 ));
55675580 param -> testflag |=T_RETRY_WITHOUT_QUICK ;
55685581 if (sort_info -> param -> testflag & T_VERBOSE )
55695582 _ma_print_keydata (stdout ,sort_param -> seg , a , USE_WHOLE_KEY );
0 commit comments