From 9edef96561704cc5c0e56ba58d02f6a03eac08e2 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Thu, 19 Feb 2004 17:22:38 +0400 Subject: Fix for #2237 and #2490 (analyze and check for RTree keys) Now checking of the RTree keys works without errors. Worklog entry about appropriate checkup's routine for the RTree added --- myisam/mi_check.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'myisam') diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 4f6aa0b46d4..4d29838ecd0 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -409,7 +409,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) if (chk_index(param,info,keyinfo,share->state.key_root[key],info->buff, &keys, param->key_crc+key,1)) DBUG_RETURN(-1); - if(!(keyinfo->flag & HA_FULLTEXT)) + if(!(keyinfo->flag & (HA_FULLTEXT | HA_SPATIAL))) { if (keys != info->state->records) { @@ -558,6 +558,10 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, DBUG_ENTER("chk_index"); DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + /* TODO: implement appropriate check for RTree keys */ + if (keyinfo->flag & HA_SPATIAL) + DBUG_RETURN(0); + if (!(temp_buff=(uchar*) my_alloca((uint) keyinfo->block_length))) { mi_check_print_error(param,"Not enough memory for keyblock"); @@ -1073,7 +1077,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) for (key=0 ; key < info->s->base.keys; key++) { if (key_checksum[key] != param->key_crc[key] && - !(info->s->keyinfo[key].flag & HA_FULLTEXT)) + !(info->s->keyinfo[key].flag & (HA_FULLTEXT | HA_SPATIAL))) { mi_check_print_error(param,"Checksum for key: %2d doesn't match checksum for records", key+1); -- cgit v1.2.1