summaryrefslogtreecommitdiff
path: root/myisam/rt_index.c
diff options
context:
space:
mode:
authoringo@mysql.com <>2006-06-28 14:27:37 +0200
committeringo@mysql.com <>2006-06-28 14:27:37 +0200
commitd8499f2d8f2ad08145c32e274a8cdd02c5933e01 (patch)
treebfe556c39463767c6c8baa87cc09cd92d1ced4fa /myisam/rt_index.c
parentffd8ed17162333032e8d69454da5319c5d03b60b (diff)
downloadmariadb-git-d8499f2d8f2ad08145c32e274a8cdd02c5933e01.tar.gz
Bug#17877 - Corrupted spatial index
CHECK TABLE could complain about a fully intact spatial index. A wrong comparison operator was used for table checking. The result was that it checked for non-matching spatial keys. This succeeded if at least two different keys were present, but failed if only the matching key was present. I fixed the key comparison.
Diffstat (limited to 'myisam/rt_index.c')
-rw-r--r--myisam/rt_index.c8
1 files changed, 5 insertions, 3 deletions
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;