summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--myisam/mi_check.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 074a1b23686..f5d46210944 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -1047,9 +1047,12 @@ 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
*/
- int search_result= (keyinfo->flag & HA_SPATIAL) ?
+ int search_result=
+#ifdef HAVE_RTREE_KEYS
+ (keyinfo->flag & HA_SPATIAL) ?
rtree_find_first(info, key, info->lastkey, key_length,
SEARCH_SAME) :
+#endif
_mi_search(info,keyinfo,info->lastkey,key_length,
SEARCH_SAME, info->s->state.key_root[key]);
if (search_result)