diff options
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index edd0b95fca0..5cb836f6bd0 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 |