diff options
Diffstat (limited to 'storage/maria/ma_check.c')
-rw-r--r-- | storage/maria/ma_check.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 086cff67dab..ed3a7a46344 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -136,11 +136,13 @@ void maria_chk_init_for_check(HA_CHECK *param, MARIA_HA *info) Set up transaction handler so that we can see all rows. When rows is read we will check the found id against param->max_tried */ - if (!ma_control_file_inited()) - param->max_trid= 0; /* Give warning for first trid found */ - else - param->max_trid= max_trid_in_system(); - + if (param->max_trid == 0) + { + if (!ma_control_file_inited()) + param->max_trid= 0; /* Give warning for first trid found */ + else + param->max_trid= max_trid_in_system(); + } maria_ignore_trids(info); } @@ -867,7 +869,7 @@ static int chk_index(HA_CHECK *param, MARIA_HA *info, MARIA_KEYDEF *keyinfo, llstr(anc_page->pos, llbuff)); } - if (anc_page->size > (uint) keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE) + if (anc_page->size > share->max_index_block_size) { _ma_check_print_error(param, "Page at %s has impossible (too big) pagelength", @@ -1758,7 +1760,7 @@ static my_bool check_head_page(HA_CHECK *param, MARIA_HA *info, uchar *record, _ma_check_print_error(param, "Page %9s: Row: %3d has an extent with " "wrong information in bitmap: " - "Page %9s Page_type: %d Bitmap: %d", + "Page: %9s Page_type: %d Bitmap: %d", llstr(page, llbuff), row, llstr(extent_page, llbuff2), page_type, bitmap_pattern); @@ -2325,11 +2327,13 @@ static int initialize_variables_for_repair(HA_CHECK *param, } /* Set up transaction handler so that we can see all rows */ - if (!ma_control_file_inited()) - param->max_trid= 0; /* Give warning for first trid found */ - else - param->max_trid= max_trid_in_system(); - + if (param->max_trid == 0) + { + if (!ma_control_file_inited()) + param->max_trid= 0; /* Give warning for first trid found */ + else + param->max_trid= max_trid_in_system(); + } maria_ignore_trids(info); /* Don't write transid's during repair */ maria_versioning(info, 0); @@ -5609,7 +5613,7 @@ static int sort_insert_key(MARIA_SORT_PARAM *sort_param, a_length+=t_length; _ma_store_page_used(share, anc_buff, a_length); key_block->end_pos+=t_length; - if (a_length <= (uint) (keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE)) + if (a_length <= share->max_index_block_size) { MARIA_KEY tmp_key2; tmp_key2.data= key_block->lastkey; |