diff options
author | hf@deer.(none) <> | 2005-08-27 18:10:46 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2005-08-27 18:10:46 +0500 |
commit | 418a7bfcde8ebc60ebb6eaf8b498587adba74de3 (patch) | |
tree | 5d8aceda33c9ef43fd4a8ee58923fcad4b7db91a /myisam | |
parent | 950a277988fea2ebffc4119c2e5cab7d44f051a4 (diff) | |
parent | 5b35789d12b89cdc5f3811eea19fc7f642bfcabb (diff) | |
download | mariadb-git-418a7bfcde8ebc60ebb6eaf8b498587adba74de3.tar.gz |
Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-5.0.clean
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 1db829808a9..ffb7cdd503f 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1036,7 +1036,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) { if (mi_is_key_active(info->s->state.key_map, key)) { - if(!(keyinfo->flag & HA_FULLTEXT)) + if(!(keyinfo->flag & HA_FULLTEXT)) { uint key_length=_mi_make_key(info,key,info->lastkey,record, start_recpos); @@ -1045,14 +1045,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, |