mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 18:25:30 +02: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:
parent
e82a82eef8
commit
5f0c98c17b
3 changed files with 21 additions and 1 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue