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

Merge branch '10.5' into 10.6

This commit is contained in:
Sergei Golubchik
2022-05-10 11:53:59 +02:00
249 changed files with 7080 additions and 1864 deletions

View File

@ -7675,6 +7675,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);
@ -7900,7 +7902,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
@ -7951,6 +7953,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);
}
}
/*
@ -8113,6 +8121,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),