diff options
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index f91a965d4ac..fa036dd8a63 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -571,9 +571,13 @@ public: store_key(THD *thd, Field *field_arg, uchar *ptr, uchar *null, uint length) :null_key(0), null_ptr(null), err(0) { - if (field_arg->type() == MYSQL_TYPE_BLOB) + if (field_arg->type() == MYSQL_TYPE_BLOB + || field_arg->type() == MYSQL_TYPE_GEOMETRY) { - /* Key segments are always packed with a 2 byte length prefix */ + /* + Key segments are always packed with a 2 byte length prefix. + See mi_rkey for details. + */ to_field= new Field_varstring(ptr, length, 2, null, 1, Field::NONE, field_arg->field_name, field_arg->table->s, field_arg->charset()); |