diff options
author | serg@sergbook.mysql.com <> | 2003-04-23 00:53:07 +0400 |
---|---|---|
committer | serg@sergbook.mysql.com <> | 2003-04-23 00:53:07 +0400 |
commit | ae51f0456475bb55ab1c9b8d04a676c901ad540a (patch) | |
tree | a44e0d897043291528cd13d047883b02a400ae1f /myisam/mi_check.c | |
parent | c7891fe9bc5f82d3ff6cc7e0931ab29b52dfd960 (diff) | |
download | mariadb-git-ae51f0456475bb55ab1c9b8d04a676c901ad540a.tar.gz |
do not mark the table as analyzed unless all the key parts are REALLY analyzed.
Diffstat (limited to 'myisam/mi_check.c')
-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)) { |