diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 57cc98593ad..b241192e286 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -3357,8 +3357,6 @@ dict_foreign_find_index( while (index != NULL) { if (types_idx != index - && !(index->type & DICT_FTS) - && !dict_index_is_spatial(index) && !index->to_be_dropped && !dict_index_is_online_ddl(index) && dict_foreign_qualify_index( @@ -6881,6 +6879,10 @@ dict_foreign_qualify_index( return(false); } + if (index->type & (DICT_SPATIAL | DICT_FTS)) { + return false; + } + for (ulint i = 0; i < n_cols; i++) { dict_field_t* field; const char* col_name; diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index c55850d68cb..82256b1738b 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1343,8 +1343,7 @@ innobase_find_fk_index( index = dict_table_get_first_index(table); while (index != NULL) { - if (!(index->type & DICT_FTS) - && dict_foreign_qualify_index( + if (dict_foreign_qualify_index( table, col_names, columns, n_cols, index, NULL, true, 0, NULL, NULL, NULL)) {