mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-5743 Server crashes in mysql_alter_table on an attempt to add a primary key to InnoDB table
This commit is contained in:
@ -6908,7 +6908,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
if (is_PK(key_info))
|
||||
{
|
||||
merged[0]= key_info[0];
|
||||
if (is_PK(table->key_info))
|
||||
if (table->key_info && is_PK(table->key_info))
|
||||
{
|
||||
old_cnt--;
|
||||
table->key_info++;
|
||||
|
Reference in New Issue
Block a user