|
Actually Only UNIQUE key is supported on long columns , So I think It is bug I should not be able to create index on long columns, Thins patch will solve the bug
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
|
index edd0b95fca0..c4b47f8290c 100644
|
--- a/sql/sql_table.cc
|
+++ b/sql/sql_table.cc
|
@@ -3941,13 +3941,13 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
column->length= MAX_LEN_GEOM_POINT_FIELD;
|
if (!column->length)
|
{
|
- if (key->type == Key::PRIMARY)
|
+ if (key->type == Key::UNIQUE)
|
+ is_hash_field_needed= true;
|
+ else
|
{
|
my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), column->field_name.str);
|
DBUG_RETURN(TRUE);
|
}
|
- else
|
- is_hash_field_needed= true;
|
}
|
}
|
#ifdef HAVE_SPATIAL
|
|
|