summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/deer.(none)>2006-09-29 17:57:16 +0500
committerunknown <holyfoot/hf@mysql.com/deer.(none)>2006-09-29 17:57:16 +0500
commit55aa43fe35473f428c2de4ea883267f8655c4433 (patch)
tree390cac59044c1e4ae0fd58ccc2d1221426147e4f /myisam
parentca5e29475c8ae52035214c710be04bcb1ed13177 (diff)
parent01fe277cc6e0863ca03ab11d1f12bd9b52dc180e (diff)
downloadmariadb-git-55aa43fe35473f428c2de4ea883267f8655c4433.tar.gz
Merge mysql.com:/home/hf/work/21888/my41-21888
into mysql.com:/home/hf/work/21888/my50-21888 myisam/mi_range.c: Auto merged mysql-test/r/gis-rtree.result: Auto merged mysql-test/t/gis-rtree.test: Auto merged
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_range.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/myisam/mi_range.c b/myisam/mi_range.c
index e78f3b11625..a28aed81aec 100644
--- a/myisam/mi_range.c
+++ b/myisam/mi_range.c
@@ -71,6 +71,21 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx, key_range *min_key,
uchar * key_buff;
uint start_key_len;
+ /*
+ The problem is that the optimizer doesn't support
+ RTree keys properly at the moment.
+ Hope this will be fixed some day.
+ But now NULL in the min_key means that we
+ didn't make the task for the RTree key
+ and expect BTree functionality from it.
+ As it's not able to handle such request
+ we return the error.
+ */
+ if (!min_key)
+ {
+ res= HA_POS_ERROR;
+ break;
+ }
key_buff= info->lastkey+info->s->base.max_key_length;
start_key_len= _mi_pack_key(info,inx, key_buff,
(uchar*) min_key->key, min_key->length,