summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-08-22 13:08:44 +0500
committerunknown <hf@deer.(none)>2005-08-22 13:08:44 +0500
commitce3cc76a514b019a2143c3039f6edd7c0851169d (patch)
treed4ad76c2eb160c09ba921a8c5443cb455e5998c8 /myisam
parent9df32ec8f8952876f10525d11d152ccbd21bfb67 (diff)
parente088a69901903405a72be2bffb8aa7dc47110cb9 (diff)
downloadmariadb-git-ce3cc76a514b019a2143c3039f6edd7c0851169d.tar.gz
Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.9645
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 60a2b664c70..246d2c58dde 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -1035,7 +1035,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
{
if ((((ulonglong) 1 << key) & info->s->state.key_map))
{
- if(!(keyinfo->flag & HA_FULLTEXT))
+ if(!(keyinfo->flag & HA_FULLTEXT))
{
uint key_length=_mi_make_key(info,key,info->lastkey,record,
start_recpos);
@@ -1044,14 +1044,18 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
/* We don't need to lock the key tree here as we don't allow
concurrent threads when running myisamchk
*/
- if (_mi_search(info,keyinfo,info->lastkey,key_length,
- SEARCH_SAME, info->s->state.key_root[key]))
- {
- mi_check_print_error(param,"Record at: %10s Can't find key for index: %2d",
- llstr(start_recpos,llbuff),key+1);
- if (error++ > MAXERR || !(param->testflag & T_VERBOSE))
- goto err2;
- }
+ int search_result= (keyinfo->flag & HA_SPATIAL) ?
+ rtree_find_first(info, key, info->lastkey, key_length,
+ SEARCH_SAME) :
+ _mi_search(info,keyinfo,info->lastkey,key_length,
+ SEARCH_SAME, info->s->state.key_root[key]);
+ if (search_result)
+ {
+ mi_check_print_error(param,"Record at: %10s Can't find key for index: %2d",
+ llstr(start_recpos,llbuff),key+1);
+ if (error++ > MAXERR || !(param->testflag & T_VERBOSE))
+ goto err2;
+ }
}
else
key_checksum[key]+=mi_byte_checksum((byte*) info->lastkey,