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

MDEV-36852 Table definition gets corrupt after adding unique hash key

This commit is contained in:
Sergei Golubchik
2025-05-21 14:56:16 +02:00
parent 6ec57588bd
commit cda1826201
4 changed files with 42 additions and 2 deletions

View File

@@ -3337,8 +3337,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
Create_field *auto_increment_key= 0;
Key_part_spec *column;
bool is_hash_field_needed= key->key_create_info.algorithm
== HA_KEY_ALG_LONG_HASH;
if (key->type == Key::IGNORE_KEY)
{
/* ignore redundant keys */
@@ -3349,6 +3347,9 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
break;
}
bool is_hash_field_needed= key->key_create_info.algorithm
== HA_KEY_ALG_LONG_HASH;
if (key_check_without_overlaps(thd, create_info, alter_info, *key))
DBUG_RETURN(true);