mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27578 DESC attribute upon spatial index creation prevents ER_DUP_INDEX warning
strip DESC from SPATIAL indexes earlier. Before check_duplicate_key() not when creating the frm
This commit is contained in:
@@ -3724,6 +3724,12 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info,
|
||||
auto_increment_key= sql_field;
|
||||
}
|
||||
|
||||
/* For SPATIAL, FULLTEXT and HASH indexes (anything other than B-tree),
|
||||
ignore the ASC/DESC attribute of columns. */
|
||||
if ((key_info->algorithm > HA_KEY_ALG_BTREE) ||
|
||||
(key_info->flags & (HA_SPATIAL|HA_FULLTEXT)))
|
||||
column->asc= true; // ignore DESC
|
||||
|
||||
key_part_info->fieldnr= field;
|
||||
key_part_info->offset= (uint16) sql_field->offset;
|
||||
key_part_info->key_type=sql_field->pack_flag;
|
||||
|
Reference in New Issue
Block a user