diff options
author | unknown <hf@deer.(none)> | 2005-08-09 21:30:28 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2005-08-09 21:30:28 +0500 |
commit | aa46ac65b8439f3da91481469fcc97e37938302c (patch) | |
tree | 62cd2e5cd53a5d291dce8b6cc9643c2fe185eaff /myisam | |
parent | c21e659cbc8d0aa98a272b909f3903008e79b264 (diff) | |
download | mariadb-git-aa46ac65b8439f3da91481469fcc97e37938302c.tar.gz |
Fix for bug #9465 (check table extended fails with SPATIAL)
myisam/mi_check.c:
different search function is used for SPATIAL keys
mysql-test/r/gis-rtree.result:
test result fixed
mysql-test/t/gis-rtree.test:
test case
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 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, |