summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-08-21 15:20:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-08-21 15:20:34 +0300
commit9258097fa3617b720b2b518060c0d09a00455051 (patch)
tree0d9e98513620fdb440f1d0f78351ca794a0f731d /sql/key.cc
parentcdc8debcaad6ee18ff7a146ab3f365367fe8ec93 (diff)
parentdc7c080369472f6f33344299d2e3d01619edf885 (diff)
downloadmariadb-git-9258097fa3617b720b2b518060c0d09a00455051.tar.gz
Merge 10.1 into 10.2
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 08bd6e8f65d..116f2954d9e 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -146,7 +146,8 @@ void key_copy(uchar *to_key, uchar *from_record, KEY *key_info,
{
key_length-= HA_KEY_BLOB_LENGTH;
length= MY_MIN(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;