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,6 +794,8 @@ static int myisamchk(MI_CHECK *param, my_string filename)
!(param->testflag & T_CHECK_ONLY_CHANGED))))
need_to_check=1;
if (info->s->base.keys && info->state->records)
{
if ((param->testflag & T_STATISTICS) &&
(share->state.changed & STATE_NOT_ANALYZED))
need_to_check=1;
......@@ -803,6 +805,7 @@ static int myisamchk(MI_CHECK *param, my_string filename)
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) &&
(share->state.changed & (STATE_CHANGED | STATE_CRASHED |
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