summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-08-15 16:48:13 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-08-15 16:48:13 +0200
commitbcc677bb7264db08b22284998706b44c377ed8ec (patch)
treeedbffbf3a801c0fcc26f6bb6a0fc0b62d151fc87 /sql/key.cc
parentb62ac161856570e9a0e92d17de1e3dd31d54410f (diff)
parent1b797e9e6308913c2472f3e04ad253e95a35d59f (diff)
downloadmariadb-git-bcc677bb7264db08b22284998706b44c377ed8ec.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/key.cc b/sql/key.cc
index 414c3392cff..f900a1b4527 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -148,7 +148,8 @@ void key_copy(uchar *to_key, uchar *from_record, KEY *key_info,
{
key_length-= HA_KEY_BLOB_LENGTH;
length= min<uint>(key_length, key_part->length);
- uint bytes= key_part->field->get_key_image(to_key, length, Field::itRAW);
+ uint bytes= key_part->field->get_key_image(to_key, length,
+ key_info->flags & HA_SPATIAL ? Field::itMBR : Field::itRAW);
if (with_zerofill && bytes < length)
bzero((char*) to_key + bytes, length - bytes);
to_key+= HA_KEY_BLOB_LENGTH;