diff options
author | unknown <ingo@mysql.com> | 2006-07-05 11:23:21 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2006-07-05 11:23:21 +0200 |
commit | a4a905f3fb426efb8bd2071d0ceb3a4c799f0f48 (patch) | |
tree | d58f5009623457c811288b59d98447758351d731 /myisam | |
parent | fef31470d5f2114f374ba181e7937d728526cbaf (diff) | |
parent | 0b235009e60929ef254e20b48ae1254196580372 (diff) | |
download | mariadb-git-a4a905f3fb426efb8bd2071d0ceb3a4c799f0f48.tar.gz |
Merge mysql.com:/home/mydev/mysql-4.1-bug17877
into mysql.com:/home/mydev/mysql-5.0-ateam
myisam/mi_key.c:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
myisam/mi_check.c:
SCCS merged
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 5 | ||||
-rw-r--r-- | myisam/mi_key.c | 2 | ||||
-rw-r--r-- | myisam/rt_index.c | 8 | ||||
-rw-r--r-- | myisam/rt_mbr.c | 6 |
4 files changed, 14 insertions, 7 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index e0f04965650..a3195ebce7f 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1158,13 +1158,14 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) #ifdef HAVE_RTREE_KEYS (keyinfo->flag & HA_SPATIAL) ? rtree_find_first(info, key, info->lastkey, key_length, - SEARCH_SAME) : + MBR_EQUAL | MBR_DATA) : #endif _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", + 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; diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 17ea56f0210..01bd0c43119 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -64,7 +64,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, TODO: nulls processing */ #ifdef HAVE_SPATIAL - return sp_make_key(info,keynr,key,record,filepos); + DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos)); #else DBUG_ASSERT(0); /* mi_open should check that this never happens*/ #endif diff --git a/myisam/rt_index.c b/myisam/rt_index.c index 97554dca4e6..1806476dc39 100644 --- a/myisam/rt_index.c +++ b/myisam/rt_index.c @@ -183,9 +183,11 @@ int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length, return -1; } - /* Save searched key */ - memcpy(info->first_mbr_key, key, keyinfo->keylength - - info->s->base.rec_reflength); + /* + Save searched key, include data pointer. + The data pointer is required if the search_flag contains MBR_DATA. + */ + memcpy(info->first_mbr_key, key, keyinfo->keylength); info->last_rkey_length = key_length; info->rtree_recursion_depth = -1; diff --git a/myisam/rt_mbr.c b/myisam/rt_mbr.c index c43daec2f7c..897862c1c9a 100644 --- a/myisam/rt_mbr.c +++ b/myisam/rt_mbr.c @@ -52,10 +52,14 @@ if (EQUAL_CMP(amin, amax, bmin, bmax)) \ return 1; \ } \ - else /* if (nextflag & MBR_DISJOINT) */ \ + else if (nextflag & MBR_DISJOINT) \ { \ if (DISJOINT_CMP(amin, amax, bmin, bmax)) \ return 1; \ + }\ + else /* if unknown comparison operator */ \ + { \ + DBUG_ASSERT(0); \ } #define RT_CMP_KORR(type, korr_func, len, nextflag) \ |