diff options
author | unknown <serg@sergbook.mysql.com> | 2003-04-23 00:53:07 +0400 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2003-04-23 00:53:07 +0400 |
commit | 32b3b9bf0f9802acec7c8093baf5212bd0f3eec6 (patch) | |
tree | a44e0d897043291528cd13d047883b02a400ae1f /myisam | |
parent | bdaa26742b338252dca856ace8c9d2439df455eb (diff) | |
download | mariadb-git-32b3b9bf0f9802acec7c8093baf5212bd0f3eec6.tar.gz |
do not mark the table as analyzed unless all the key parts are REALLY analyzed.
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 5cbe0a7d2f3..b23d4b2277b 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -3544,12 +3544,14 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update) } if (update & UPDATE_STAT) { - uint key_parts= mi_uint2korr(share->state.header.key_parts); + uint i, key_parts= mi_uint2korr(share->state.header.key_parts); share->state.rec_per_key_rows=info->state->records; - memcpy((char*) share->state.rec_per_key_part, - (char*) param->rec_per_key_part, - sizeof(*param->rec_per_key_part)*key_parts); share->state.changed&= ~STATE_NOT_ANALYZED; + for (i=0; i<key_parts; i++) + { + if (!(share->state.rec_per_key_part[i]=param->rec_per_key_part[i])) + share->state.changed|= STATE_NOT_ANALYZED; + } } if (update & (UPDATE_STAT | UPDATE_SORT | UPDATE_TIME | UPDATE_AUTO_INC)) { |