diff options
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index cb2b56d93de..ceac8f6356c 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -185,21 +185,33 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) empty+=info->s->base.pack_reclength; } } + if (test_flag & T_VERBOSE) + puts("\n"); if (empty != info->state->empty) { - if (test_flag & T_VERBOSE) puts(""); mi_check_print_warning(param, - "Not used space is supposed to be: %s but is: %s", - llstr(info->state->empty,buff), - llstr(empty,buff2)); - info->state->empty=empty; + "Found %s deleted space in delete link chain. Should be %s", + llstr(empty,buff2), + llstr(info->state->empty,buff)); } - if (i != 0 || next_link != HA_OFFSET_ERROR) + if (next_link != HA_OFFSET_ERROR) + { + mi_check_print_error(param, + "Found more than the expected %s deleted rows in delete link chain", + llstr(info->state->del, buff)); goto wrong; - - if (test_flag & T_VERBOSE) puts("\n"); + } + if (i != 0) + { + mi_check_print_error(param, + "Found %s deleted rows in delete link chain. Should be %s", + llstr(info->state->del - i, buff2), + llstr(info->state->del, buff)); + goto wrong; + } } DBUG_RETURN(0); + wrong: param->testflag|=T_RETRY_WITHOUT_QUICK; if (test_flag & T_VERBOSE) puts(""); @@ -1025,6 +1037,13 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) } } + if (del_length != info->state->empty) + { + mi_check_print_warning(param, + "Found %s deleted space. Should be %s", + llstr(del_length,llbuff2), + llstr(info->state->empty,llbuff)); + } if (used+empty+del_length != info->state->data_file_length) { mi_check_print_warning(param, |