1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.8' into 10.9

This commit is contained in:
Sergei Golubchik
2022-05-18 15:04:50 +02:00
365 changed files with 10200 additions and 2464 deletions

View File

@ -7955,6 +7955,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
{
/* New column definitions are added here */
List<Create_field> new_create_list;
/* System-invisible fields must be added last */
List<Create_field> new_create_tail;
/* New key definitions are added here */
List<Key> new_key_list;
List<Alter_rename_key> rename_key_list(alter_info->alter_rename_key_list);
@ -8181,7 +8183,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
dropped_sys_vers_fields|= field->flags;
drop_it.remove();
}
else
else if (field->invisible < INVISIBLE_SYSTEM)
{
/*
This field was not dropped and not changed, add it to the list
@ -8232,6 +8234,12 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
alter_it.remove();
}
}
else
{
DBUG_ASSERT(field->invisible == INVISIBLE_SYSTEM);
def= new (thd->mem_root) Create_field(thd, field, field);
new_create_tail.push_back(def, thd->mem_root);
}
}
/*
@ -8394,6 +8402,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
alter_it.remove();
}
}
new_create_list.append(&new_create_tail);
if (unlikely(alter_info->alter_list.elements))
{
my_error(ER_BAD_FIELD_ERROR, MYF(0),