summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorgkodinov@dl145s.mysql.com <>2006-10-20 10:57:38 +0200
committergkodinov@dl145s.mysql.com <>2006-10-20 10:57:38 +0200
commit0612a212d129501436025403787c48f74879b00a (patch)
treecf51611706126ce58f38d153ac2385b0a17a8b93 /myisam
parentd2fa9fd192ea4e42210671bd0ca7735d4f970dc3 (diff)
parent1dacdd4c85685a144615b22374b1dbb86ac1ead9 (diff)
downloadmariadb-git-0612a212d129501436025403787c48f74879b00a.tar.gz
Merge bk-internal:/home/bk/mysql-4.1
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
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 1e0fd42334e..de042845d1e 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,