1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35021 Behavior for RTREE indexes changed, assertion fails

disallow USING RTREE for not SPATIAL index
This commit is contained in:
Sergei Golubchik
2024-09-30 22:59:47 +02:00
parent b3afd9f640
commit d396fb9226
3 changed files with 19 additions and 1 deletions

View File

@@ -3347,7 +3347,7 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info,
my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0), file->table_type());
DBUG_RETURN(TRUE);
}
if (key_info->user_defined_key_parts != 1)
if (key->type != Key::SPATIAL || key_info->user_defined_key_parts != 1)
{
my_error(ER_WRONG_ARGUMENTS, MYF(0), "RTREE INDEX");
DBUG_RETURN(TRUE);