Commit cb82f06d authored by serg@serg.mylan's avatar serg@serg.mylan

do not try to "analyze" or "sort index" in the table that has no indexes or no...

do not try to "analyze" or "sort index" in the table that has no indexes or no records if --check-only-changed option is used.
It's because such a table is never marked as "analyzed" or "sorted", so --check-only-changed doesn't work
parent 1fb8c31e
...@@ -794,15 +794,18 @@ static int myisamchk(MI_CHECK *param, my_string filename) ...@@ -794,15 +794,18 @@ static int myisamchk(MI_CHECK *param, my_string filename)
!(param->testflag & T_CHECK_ONLY_CHANGED)))) !(param->testflag & T_CHECK_ONLY_CHANGED))))
need_to_check=1; need_to_check=1;
if ((param->testflag & T_STATISTICS) && if (info->s->base.keys && info->state->records)
(share->state.changed & STATE_NOT_ANALYZED)) {
need_to_check=1; if ((param->testflag & T_STATISTICS) &&
if ((param->testflag & T_SORT_INDEX) && (share->state.changed & STATE_NOT_ANALYZED))
(share->state.changed & STATE_NOT_SORTED_PAGES)) need_to_check=1;
need_to_check=1; if ((param->testflag & T_SORT_INDEX) &&
if ((param->testflag & T_REP_BY_SORT) && (share->state.changed & STATE_NOT_SORTED_PAGES))
(share->state.changed & STATE_NOT_OPTIMIZED_KEYS)) need_to_check=1;
need_to_check=1; if ((param->testflag & T_REP_BY_SORT) &&
(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
need_to_check=1;
}
if ((param->testflag & T_CHECK_ONLY_CHANGED) && if ((param->testflag & T_CHECK_ONLY_CHANGED) &&
(share->state.changed & (STATE_CHANGED | STATE_CRASHED | (share->state.changed & (STATE_CHANGED | STATE_CRASHED |
STATE_CRASHED_ON_REPAIR))) STATE_CRASHED_ON_REPAIR)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment