mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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
This commit is contained in:
parent
b52da698f1
commit
d1be872edf
1 changed files with 12 additions and 9 deletions
|
|
@ -794,15 +794,18 @@ static int myisamchk(MI_CHECK *param, my_string filename)
|
|||
!(param->testflag & T_CHECK_ONLY_CHANGED))))
|
||||
need_to_check=1;
|
||||
|
||||
if ((param->testflag & T_STATISTICS) &&
|
||||
(share->state.changed & STATE_NOT_ANALYZED))
|
||||
need_to_check=1;
|
||||
if ((param->testflag & T_SORT_INDEX) &&
|
||||
(share->state.changed & STATE_NOT_SORTED_PAGES))
|
||||
need_to_check=1;
|
||||
if ((param->testflag & T_REP_BY_SORT) &&
|
||||
(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
|
||||
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;
|
||||
if ((param->testflag & T_SORT_INDEX) &&
|
||||
(share->state.changed & STATE_NOT_SORTED_PAGES))
|
||||
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) &&
|
||||
(share->state.changed & (STATE_CHANGED | STATE_CRASHED |
|
||||
STATE_CRASHED_ON_REPAIR)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue