summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <gkodinov@dl145s.mysql.com>2006-10-20 11:02:56 +0200
committerunknown <gkodinov@dl145s.mysql.com>2006-10-20 11:02:56 +0200
commit8cc480915f51c29b1334b28fb84e92721a1b3914 (patch)
treef61c971fc2f173b68efd04f3f22adc538934ec92 /myisam
parent3ad2baa17293a8e2a5dc7f3803e97b380f1c1d5d (diff)
parent5e1fe0f80043993c1db64169e4d87eb787762763 (diff)
downloadmariadb-git-8cc480915f51c29b1334b28fb84e92721a1b3914.tar.gz
Merge bk-internal:/home/bk/mysql-5.0
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt mysql-test/r/myisam.result: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_select.cc: 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,