mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
MDEV-17546 SPATIAL INDEX should not be allowed for FOREIGN KEY
dict_foreign_qualify_index(): Reject both FULLTEXT and SPATIAL indexes. Remove these checks from the callers. It is unclear whether this bug affected MariaDB Server. FOREIGN KEY constraints on geometry column types could have been rejected due to column type restrictions.
This commit is contained in:
parent
8c9c583aff
commit
e548d92b23
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue